-
Notifications
You must be signed in to change notification settings - Fork 6k
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
New semantic tests extracted #6888
New semantic tests extracted #6888
Conversation
Partial fixes #4223 |
There are some trailing whitespaces (please check the failing test) |
Where were these tests extracted from? Can they be removed from the cpp test file(s) accordingly? |
Done |
@leonardoalt , This has been taken from SolidityEndToEndTest.cpp. I am not sure, if I can just delete them. |
@anurag-git The main purpose of extracting the tests is to be able to remove them from Regarding the sanity of |
Codecov Report
@@ Coverage Diff @@
## develop #6888 +/- ##
===========================================
+ Coverage 86.99% 87.01% +0.01%
===========================================
Files 427 427
Lines 40842 40810 -32
Branches 4829 4825 -4
===========================================
- Hits 35532 35512 -20
+ Misses 3715 3706 -9
+ Partials 1595 1592 -3
|
Thanks, changes done and pushed. |
Discussion from Gitter: this PR depends on the yet non-existing feature |
@anurag-git It might take a bit of time until we have a good solution for the If you want to go ahead with this soon, there are two options: either you just don't extract tests that involve
in the expectations (you can find examples of such tests in |
a04ef7b
to
893d6b9
Compare
Took 2nd approach and pushed. |
893d6b9
to
e38bf7d
Compare
I'm still not sure about this solution with 2 files. |
@ekpyron , Would need your help here? I am ok with both options. |
I think I'll create a way to run both kinds of tests at once after all - an imperfect, but working version will be ready shortly - I'll let you know when it's done, then you can continue based on that (sorry for the resulting delay). |
@anurag-git We just merged #6916, so if you rebase this PR on top of the most current |
I hope the changes are correct. Finally. |
@anurag-git Thank you very much! One final thing before we can merge this: can you squash the PR into one single commit? |
3232090
to
4fba476
Compare
4fba476
to
10b81f6
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.
I cleanup up the damage this took during rebasing. Now it's fine to be merged, once the tests pass again!
} | ||
)"; | ||
compileAndRun(sourceCode); | ||
testContractAgainstCppOnRange("f(uint256)", [](u256 const& a) -> u256 { return a * 7; }, 0, 100); |
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.
By the way: for this particular test here, it's not a problem and I don't really mind, but this command actually tests every value between 0
and 100
, whereas the extracted test only checks two values, namely 0
and 99
.
So actually tests involving testContractAgainstCppOnRange
should probably stay in SolidityEndToEndTest.cpp
.
But yeah, in this particular case, it really doesn't matter, if the full range is checked or not, so it's fine.
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.
Ok. I will keep in my mind for future changes
1. Transaction Status 2. Empty Contract 3. Smoke test for Range
10b81f6
to
60332c6
Compare
Description
Extracted and added semantic tests for
Checklist