Index: test/unittests/interpreter/bytecodes-unittest.cc |
diff --git a/test/unittests/interpreter/bytecodes-unittest.cc b/test/unittests/interpreter/bytecodes-unittest.cc |
index e6353a4ddf4ffb85bb1563b822ec0dafbb1b0bba..212e02996b65c98a8674dbd453a60a0ef68fcd26 100644 |
--- a/test/unittests/interpreter/bytecodes-unittest.cc |
+++ b/test/unittests/interpreter/bytecodes-unittest.cc |
@@ -155,6 +155,18 @@ TEST(Bytecodes, RegisterOperands) { |
#undef IS_NOT_REGISTER_INPUT_OPERAND_TYPE |
} |
+TEST(Bytecodes, DebugBreak) { |
+ for (uint32_t i = 0; i < Bytecodes::ToByte(Bytecode::kLast); i++) { |
+ Bytecode bytecode = Bytecodes::FromByte(i); |
+ Bytecode debugbreak = Bytecodes::GetDebugBreak(bytecode); |
+ if (!Bytecodes::IsDebugBreak(debugbreak)) { |
+ PrintF("Bytecode %s has no matching debug break with length %d\n", |
+ Bytecodes::ToString(bytecode), Bytecodes::Size(bytecode)); |
+ CHECK(false); |
+ } |
+ } |
+} |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |