Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeilaWang committed Oct 22, 2024
1 parent 5fcfccb commit f2b7bc1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions barretenberg/cpp/src/barretenberg/vm/avm/tests/execution.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@ TEST_F(AvmExecutionTests, kernelInputOpcodes)
VariantWith<uint16_t>(1)))));

// SENDER
EXPECT_THAT(instructions.at(2),
EXPECT_THAT(instructions.at(1),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
Expand All @@ -1469,71 +1469,71 @@ TEST_F(AvmExecutionTests, kernelInputOpcodes)

// FUNCTIONSELECTOR
EXPECT_THAT(
instructions.at(3),
instructions.at(2),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::FUNCTIONSELECTOR)),
VariantWith<uint16_t>(3)))));

// TRANSACTIONFEE
EXPECT_THAT(instructions.at(4),
EXPECT_THAT(instructions.at(3),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::TRANSACTIONFEE)),
VariantWith<uint16_t>(4)))));

// CHAINID
EXPECT_THAT(instructions.at(5),
EXPECT_THAT(instructions.at(4),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::CHAINID)),
VariantWith<uint16_t>(5)))));

// VERSION
EXPECT_THAT(instructions.at(6),
EXPECT_THAT(instructions.at(5),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::VERSION)),
VariantWith<uint16_t>(6)))));

// BLOCKNUMBER
EXPECT_THAT(instructions.at(7),
EXPECT_THAT(instructions.at(6),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::BLOCKNUMBER)),
VariantWith<uint16_t>(7)))));

// TIMESTAMP
EXPECT_THAT(instructions.at(8),
EXPECT_THAT(instructions.at(7),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::TIMESTAMP)),
VariantWith<uint16_t>(8)))));

// FEEPERL2GAS
EXPECT_THAT(instructions.at(9),
EXPECT_THAT(instructions.at(8),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::FEEPERL2GAS)),
VariantWith<uint16_t>(9)))));

// FEEPERDAGAS
EXPECT_THAT(instructions.at(10),
EXPECT_THAT(instructions.at(9),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
VariantWith<uint8_t>(static_cast<uint8_t>(EnvironmentVariable::FEEPERDAGAS)),
VariantWith<uint16_t>(10)))));

// ISSTATICCALL
EXPECT_THAT(instructions.at(11),
EXPECT_THAT(instructions.at(10),
AllOf(Field(&Instruction::op_code, OpCode::GETENVVAR_16),
Field(&Instruction::operands,
ElementsAre(VariantWith<uint8_t>(0),
Expand Down

0 comments on commit f2b7bc1

Please sign in to comment.