-
Couldn't load subscription status.
- Fork 1.4k
Smart assertions #5036
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
Smart assertions #5036
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d8adb00 to
39f008e
Compare
621f18d to
b74624e
Compare
404dfd7 to
ef0b2b6
Compare
unify test result types
adamgfraser
reviewed
Jun 1, 2021
adamgfraser
reviewed
Jun 1, 2021
adamgfraser
approved these changes
Jun 1, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this merged!
hmemcpy
pushed a commit
to hmemcpy/zio
that referenced
this pull request
Jun 6, 2021
* first pass at smart assertions * refactor smart assertions & add more matchers * clean up and add notes * improve rendering * wip: composable smart assertions * wow. much progress. * wip: smart assert improvements * add more smart errors to assertions * add helpful error messages * support exceptions in smart assert * work more on errors * clean up * as instance of helpers * implement cross version macro dsl * initial work on Scala 3 support * clean up smart assert for Scala 3 * add smart forall * fix tests * fix type issue * Zoom WIP * progress on Zoom execution * improve encoding for Zoom * clean up * improved assertion dsl * rendering error progress * clean up * much better assert encoding * flattening and rendering trees * improve annotations * add code/span * enable pruning of test trace * clean up tests * add error messages * highlight parent span * handle dies in assert correctly * add Assert wrapper * add more assertions * integrate smart assertions with default test reporter * add more assertions * more assertions * improve rendering/add assertions * enable nested errors * add isEven/isOdd assertions * start scalafix rule * unify test result types unify test result types * fix warnings * fix macro method application * fix compilation errors * fix tests * implement working assertTrue for dotty * fix scalafix rule for assertTrue * clean up * lift GenFailureDetails to AssertResult * prepare for diffing * String diffing * revert extra changes * Remove stray println * Remove stray change Co-authored-by: Adam Fraser <[email protected]> # Conflicts: # test-junit/jvm/src/main/scala/zio/test/junit/ZTestJUnitRunner.scala # test/shared/src/main/scala/zio/test/DefaultTestReporter.scala # test/shared/src/main/scala/zio/test/package.scala
hmemcpy
pushed a commit
to hmemcpy/zio
that referenced
this pull request
Jun 12, 2021
* first pass at smart assertions * refactor smart assertions & add more matchers * clean up and add notes * improve rendering * wip: composable smart assertions * wow. much progress. * wip: smart assert improvements * add more smart errors to assertions * add helpful error messages * support exceptions in smart assert * work more on errors * clean up * as instance of helpers * implement cross version macro dsl * initial work on Scala 3 support * clean up smart assert for Scala 3 * add smart forall * fix tests * fix type issue * Zoom WIP * progress on Zoom execution * improve encoding for Zoom * clean up * improved assertion dsl * rendering error progress * clean up * much better assert encoding * flattening and rendering trees * improve annotations * add code/span * enable pruning of test trace * clean up tests * add error messages * highlight parent span * handle dies in assert correctly * add Assert wrapper * add more assertions * integrate smart assertions with default test reporter * add more assertions * more assertions * improve rendering/add assertions * enable nested errors * add isEven/isOdd assertions * start scalafix rule * unify test result types unify test result types * fix warnings * fix macro method application * fix compilation errors * fix tests * implement working assertTrue for dotty * fix scalafix rule for assertTrue * clean up * lift GenFailureDetails to AssertResult * prepare for diffing * String diffing * revert extra changes * Remove stray println * Remove stray change Co-authored-by: Adam Fraser <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@adamgfraser and I have put together a first pass at smart assertions.
Basically a series of rewrites (I mean, all macros are rewrites I guess😜 ):
EDIT: The above is no longer true 😜 We now translate into a specialized arrow-based dsl.