Index: test/unittests/interpreter/bytecode-array-iterator-unittest.cc |
diff --git a/test/unittests/interpreter/bytecode-array-iterator-unittest.cc b/test/unittests/interpreter/bytecode-array-iterator-unittest.cc |
index b257c35c87a3868a4550c216319ebf47f1f383b3..9e2ea863bcbc1d01f1757e4c38989632a6e0b45c 100644 |
--- a/test/unittests/interpreter/bytecode-array-iterator-unittest.cc |
+++ b/test/unittests/interpreter/bytecode-array-iterator-unittest.cc |
@@ -47,6 +47,7 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) { |
.LoadLiteral(smi_1) |
.StoreAccumulatorInRegister(reg_1) |
.LoadAccumulatorWithRegister(reg_0) |
+ .BinaryOperation(Token::Value::ADD, reg_0) |
.StoreAccumulatorInRegister(reg_1) |
.LoadNamedProperty(reg_1, name, feedback_slot) |
.BinaryOperation(Token::Value::ADD, reg_0) |
@@ -156,6 +157,15 @@ TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) { |
offset += Bytecodes::Size(Bytecode::kLdar, OperandScale::kSingle); |
iterator.Advance(); |
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kAdd); |
+ CHECK_EQ(iterator.current_offset(), offset); |
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); |
+ CHECK_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index()); |
+ CHECK_EQ(iterator.GetRegisterOperandRange(0), 1); |
+ CHECK(!iterator.done()); |
+ offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle); |
+ iterator.Advance(); |
+ |
CHECK_EQ(iterator.current_bytecode(), Bytecode::kStar); |
CHECK_EQ(iterator.current_offset(), offset); |
CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle); |