★ wanayoo — archive 1999 https://github.com/utPLSQL/utPLSQL/pull/494Nouvelle recherche | Portail wanayoo
Skip to content
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

Removed `ut_expectation` sub-types. #494

Merged
merged 2 commits into from Oct 17, 2017
Merged

Removed `ut_expectation` sub-types. #494

merged 2 commits into from Oct 17, 2017

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 the enhancement label Oct 16, 2017
@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
3 checks passed
3 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.02%) to 90.397%
Details
@ghost ghost removed the in progress label Oct 17, 2017
@jgebal jgebal deleted the feature/expectation_cleanup branch Oct 20, 2017
@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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.