-
Notifications
You must be signed in to change notification settings - Fork 187
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
enable use of Context
in tests and misc test refactoring
#871
Conversation
g-r-a-n-t
commented
Apr 17, 2023
•
edited
Loading
edited
- updated the test runner to enable context-related operations
- moved a handful of tests from the legacy-tests crate to the tests crate
@@ -184,7 +184,6 @@ test_analysis! { erc20_token, "demos/erc20_token.fe"} | |||
test_analysis! { guest_book, "demos/guest_book.fe"} | |||
test_analysis! { simple_open_auction, "demos/simple_open_auction.fe"} | |||
test_analysis! { uniswap, "demos/uniswap.fe"} | |||
test_analysis! { address_bytes10_map, "features/address_bytes10_map.fe"} |
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.
Im ok with removing most of these
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'd like to talk more about these snapshot tests at the next meeting
b5e712d
to
8aedab0
Compare
@@ -53,11 +53,8 @@ fn mir_lower_std_lib() { | |||
test_lowering! { mir_erc20_token, "demos/erc20_token.fe"} | |||
test_lowering! { mir_guest_book, "demos/guest_book.fe"} | |||
test_lowering! { mir_uniswap, "demos/uniswap.fe"} | |||
test_lowering! { mir_address_bytes10_map, "features/address_bytes10_map.fe"} |
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.
same for these
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.
Looks good, just left a comment regarding loss of assertions of revert error.
input_len: 0, | ||
output_offset: 0, | ||
output_len: 0 | ||
) == 0 |
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.
It looks like the old tests also covered that the correct error code is returned whereas these tests simply check that it reverts but do not check the actual error that was returned. Maybe we can add this back?