-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add more built-in matchers to the Cadence Testing Framework #2420
Add more built-in matchers to the Cadence Testing Framework #2420
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2420 +/- ##
==========================================
- Coverage 78.60% 78.58% -0.02%
==========================================
Files 316 315 -1
Lines 68848 68886 +38
==========================================
+ Hits 54118 54135 +17
- Misses 12928 12943 +15
- Partials 1802 1808 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 24 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Nice!
This way it can be utilized in the test.cdc contract.
ab8ee8c
to
bad630c
Compare
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.
Great work! 👌
Co-authored-by: Supun Setunga <supun.setunga@gmail.com>
elementFound = value.ContainsKey( | ||
inter, | ||
invocation.LocationRange, | ||
element, | ||
) |
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.
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.
cc @m-Peter
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.
Yes, it seems that the Go implementation inspired by Hamcrest, has also dedicated matchers for arrays and dictionaries:
is.ArrayContaining(expected)
is.ArrayMatching(expected)
is.MapContaining(expected)
is.MapContainingValues(expected)
is.MapMatchingValues(expected)
Supun noted this as well. What do you think should be the way to go about this? Do you have any desired API in mind?
Work towards: onflow/developer-grants#148
Description
Implements the matchers described in #1889
master
branchFiles changed
in the Github PR explorer