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
Integration tests for boolean and assertion field operations #166
Comments
I would like to take this issue if no one else is working on this. |
@aga7hokakological that would be great! Please feel free to go for it |
@aga7hokakological yep, exactly. For example, we'd like to have a test that validates that calling |
@aga7hokakological I just wanted to check in and see if you have any other questions about this task that I can help with. It's also fine if it turns out you don't have time to work on it - please just let us know if that's the case :) |
Hey @grjte sorry, I was away for a while. I had figured out about the success cases but for failed cases such as for
|
Hey @aga7hokakological no problem. Is the problem that it's throwing a compilation error so it never gets a chance to execute and therefore an execution error is never triggered? If that's the case, I think it's fine to just test for a TestError::AssemblyError here. If that's not the issue can you give me a bit more detail? |
@grjte So here, If I do For Here |
@aga7hokakological Ok, I see. I think the issue is that you're using the wrong input to your
|
@grjte Thanks. Got the silly mistake. I have corrected it. For the prop-tests too I have added tests but in there do I need to consider values as Test for |
Thanks @0xkanekiken! Yep, that's correct - in fact, the contents of the assembly note have been migrated to our docs now, so you can check out the assembly docs here: https://maticnetwork.github.io/miden/user_docs/assembly/main.html @aga7hokakological regarding the first question about the proptests:
You've brought up a good point though - since the only valid inputs are boolean values, proptests are probably overkill here, and we should probably stick to unit tests, since there are only 2 or 4 options to test for each of these anyway. We use proptests for all other tests which is why I had them specified in this issue, but I shouldn't have - sorry for my mistake and the extra work |
@grjte and @0xkanekiken Thank you. Below code helped me.
PR: #210 |
Closed by #210 |
Tests for boolean and assertion field operations need to be added to the integration tests.
Tests should follow the existing pattern with the following tests added for each of the boolean field operations and the
assert
operation:a proptest of the expected success case(removed as it's not necessary)The u32 bitwise tests provide an example.
Specs for the operations are in the Miden Assembly note.
The field operations which are missing tests are:
More information can also be seen in the field_ops assembly parsers.
The text was updated successfully, but these errors were encountered: