Skip to content

Removed ut_expectation sub-types. #494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 17, 2017
Merged

Conversation

jgebal
Copy link
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