mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Merge pull request #531 from bocoup/debugger
Add tests for `debugger` statement
This commit is contained in:
commit
5b06fab039
10
test/language/statements/debugger/expression.js
Normal file
10
test/language/statements/debugger/expression.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `debugger` token may not occupy an expression position
|
||||||
|
esid: sec-debugger-statement
|
||||||
|
es6id: 13.16
|
||||||
|
negative: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(debugger);
|
12
test/language/statements/debugger/statement.js
Normal file
12
test/language/statements/debugger/statement.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `debugger` token may occupy a statement position
|
||||||
|
esid: sec-debugger-statement
|
||||||
|
es6id: 13.16
|
||||||
|
---*/
|
||||||
|
|
||||||
|
// Expressing within a `while` statement ensures that the `debugger keyword is
|
||||||
|
// not erroneously interpreted as a declaration. It also avoids statement
|
||||||
|
// evaluation, which is host-defined an may interrupt test execution.
|
||||||
|
while (false) debugger;
|
Loading…
x
Reference in New Issue
Block a user