Index: test/cctest/interpreter/test-bytecode-generator.cc |
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc |
index e69a5ba06d654d6ca6a46780affd2fa878a329a2..c3151976f820a80a94848c6f6c9c0c679f72fd81 100644 |
--- a/test/cctest/interpreter/test-bytecode-generator.cc |
+++ b/test/cctest/interpreter/test-bytecode-generator.cc |
@@ -8341,6 +8341,31 @@ TEST(WithStatement) { |
} |
} |
+TEST(DoDebugger) { |
+ InitializedHandleScope handle_scope; |
+ BytecodeGeneratorHelper helper; |
+ |
+ // clang-format off |
+ ExpectedSnippet<const char*> snippet = { |
+ "debugger;", |
+ 0, |
+ 1, |
+ 4, |
+ { |
+ B(StackCheck), // |
+ B(Debugger), // |
+ B(LdaUndefined), // |
+ B(Return) // |
+ }, |
+ 0 |
+ }; |
+ // clang-format on |
+ |
+ Handle<BytecodeArray> bytecode_array = |
+ helper.MakeBytecodeForFunctionBody(snippet.code_snippet); |
+ CheckBytecodeArrayEqual(snippet, bytecode_array); |
+} |
+ |
} // namespace interpreter |
} // namespace internal |
} // namespace v8 |