Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removed ut_expectation sub-types.#494

Merged
jgebal merged 2 commits intodevelopfrom
feature/expectation_cleanup
Oct 17, 2017
Merged

Removed ut_expectation sub-types.#494
jgebal merged 2 commits intodevelopfrom
feature/expectation_cleanup

Conversation

@jgebal
Copy link
Copy Markdown
Member

@jgebal jgebal commented Oct 16, 2017

Moved all shortcuts directly to ut_expectation.
The original design was over-complicated and made it hard to write new code and understand existing code.
With that change, one behavior related to the shortcuts (to_equal etc.) will change.
Currently:

  • line ut.expect(1).to_be_empty(); will give compilation error: PLS-00302: component 'TO_BE_EMPTY' must be declared
  • line ut.expect(1).to_(be_empty()); will compile successfully and on execution expectation fails with message: The matcher 'to_be_empty' cannot be used with data type (number).

After simplification, both will compile and both will make expectation fail.

This change brings simplification to the code-base and improves consistency of the framework.
As a side note, the failure message from the framework is much more readable and easy to understand than the compilation error from Oracle.

Moved all shortcuts directly to `ut_expectation`.
The original design was over-complicated and made it hard to write new code and understand existing code.
With that change, one behavior related to the shortcuts (`to_equal` etc.) will change.
Currently:
- line `ut.expect(1).to_be_empty();` will give compilation error: `PLS-00302: component 'TO_BE_EMPTY' must be declared`
- line `ut.expect(1).to_(be_empty());` will compile successfully and on execution expectation fails with message: `The matcher 'to_be_empty' cannot be used with data type (number).`
After simplification, both will compile and both will make expectation fail.

This change brings simplification to the code-base and improves consistency of the framework.
As a side note,
The failure message from the framework is much more readable and easy to understand than the compilation error from Oracle.
@jgebal jgebal added this to the v3.1.0 milestone Oct 16, 2017
@ghost ghost assigned jgebal Oct 16, 2017
@ghost ghost added the in progress label Oct 16, 2017
# Conflicts:
#	source/uninstall.sql
@jgebal jgebal merged commit 725d2c2 into develop Oct 17, 2017
@ghost ghost removed the in progress label Oct 17, 2017
@jgebal jgebal deleted the feature/expectation_cleanup branch October 20, 2017 07:04
@jgebal jgebal modified the milestones: v3.1.0, v3.0.4 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants