Skip to content

Commit

Permalink
fix(test): hint_load test (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpwang authored Feb 4, 2025
1 parent 57d11cb commit ddbad04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- "crates/circuits/**"
- "crates/vm/**"
- "extensions/native/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
Expand Down
8 changes: 8 additions & 0 deletions crates/vm/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ fn test_hint_load_2() {
F::ZERO,
0,
),
Instruction::from_isize(HINT_STOREW.global_opcode(), 32, 0, 0, 4, 4),
Instruction::phantom(
PhantomDiscriminant(NativePhantom::HintLoad as u16),
F::ZERO,
Expand All @@ -748,6 +749,13 @@ fn test_hint_load_2() {
Default::default(),
);
segment.execute_from_pc(0).unwrap();
assert_eq!(
segment
.chip_complex
.memory_controller()
.unsafe_read_cell(F::from_canonical_usize(4), F::from_canonical_usize(32)),
F::ZERO
);
let streams = segment.chip_complex.take_streams();
assert!(streams.input_stream.is_empty());
assert_eq!(streams.hint_stream, VecDeque::from(vec![F::ONE]));
Expand Down

0 comments on commit ddbad04

Please sign in to comment.