test(vm): add comprehensive unit tests for bytecode argument encoding and decoding (#4240)#4735
Open
ParthMozarkar wants to merge 2 commits intoboa-dev:mainfrom
Open
test(vm): add comprehensive unit tests for bytecode argument encoding and decoding (#4240)#4735ParthMozarkar wants to merge 2 commits intoboa-dev:mainfrom
ParthMozarkar wants to merge 2 commits intoboa-dev:mainfrom
Conversation
Test262 conformance changes
|
|
I think you should base this off main and not off your own branch with console.table implemented |
9e5e7ef to
a37adbf
Compare
Author
|
Thanks for pointing that out you're right. I’ve rebased the branch on top of main and force pushed the updated changes so the PR now only contains the unit test additions for #4240. Please let me know if anything else needs adjustment. 🙌 |
The test test_complex_tuple_decode_out_of_bounds provided an array of size 3 for a type that requires 3 bytes ((u8, i8) where the first is the format u8). Modifying the test array to [0, 1] reduces length to 2, correctly testing the bounds error. Also explicitly used the unified read::<u8> to bounds check reading the format byte across decode implementations.
80ef567 to
4c566d1
Compare
Author
|
@jedel1043 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive unit tests for bytecode argument encoding and decoding in:
core/engine/src/vm/opcode/args.rs
as requested in issue #4240.
What’s Included
Motivation
Bytecode argument handling is a critical component of the VM execution pipeline.
These tests strengthen confidence in argument parsing correctness and protect against silent corruption or unsafe memory access.
By covering both valid and invalid cases, this improves robustness and makes future refactors safer.
Verification
cargo testpasses successfully.cargo fmt.Closes #4240