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

Test with assert string panics #914

Closed
g-r-a-n-t opened this issue Aug 12, 2023 · 1 comment
Closed

Test with assert string panics #914

g-r-a-n-t opened this issue Aug 12, 2023 · 1 comment

Comments

@g-r-a-n-t
Copy link
Member

What is wrong?

Testing something like

#test 
fn my_test() {
    assert false, "oops"
}

results in the following compiler panic.

failures:

---- test_assert_string stdout ----
Error: TypeError: Unknown data object "6702203846031428494".
  --> input.yul:12:43:
   |
12 |             let data_offset := dataoffset("6702203846031428494")
   |                                           ^^^^^^^^^^^^^^^^^^^^^


Error: TypeError: Unknown data object "6702203846031428494".
  --> input.yul:13:39:
   |
13 |             let data_size := datasize("6702203846031428494")
   |                                       ^^^^^^^^^^^^^^^^^^^^^


thread 'test_assert_string' panicked at 'Yul compilation failed with the above errors', crates/driver/src/lib.rs:273:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

How can it be fixed

The error string should be included in the test bytecode. There might be multiple issues related to this.

@g-r-a-n-t
Copy link
Member Author

#926

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant