Skip to content

Commit

Permalink
fix: add variable to be explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-0x committed Sep 7, 2023
1 parent 156006c commit 91c6c7b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ fn test_exec_jump_invalid() {
// Given
let bytecode: Span<u8> = array![0x01, 0x02, 0x03, 0x5B, 0x04, 0x05].span();
let mut ctx = setup_execution_context_with_bytecode(bytecode);
ctx.stack.push(0x02);
let counter = 0x02;
ctx.stack.push(counter);

// When
let result = ctx.exec_jump();
Expand All @@ -121,7 +122,8 @@ fn test_exec_jump_out_of_bounds() {
// Given
let bytecode: Span<u8> = array![0x01, 0x02, 0x03, 0x5B, 0x04, 0x05].span();
let mut ctx = setup_execution_context_with_bytecode(bytecode);
ctx.stack.push(0xFF);
let counter = 0xFF;
ctx.stack.push(counter);

// When
let result = ctx.exec_jump();
Expand All @@ -142,7 +144,8 @@ fn test_exec_jump_inside_pushn() {
// Given
let bytecode: Span<u8> = array![0x60, 0x5B, 0x60, 0x00].span();
let mut ctx = setup_execution_context_with_bytecode(bytecode);
ctx.stack.push(0x01);
let counter = 0x01;
ctx.stack.push(counter);

// When
let result = ctx.exec_jump();
Expand Down

0 comments on commit 91c6c7b

Please sign in to comment.