mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
The `negative` frontmatter tag expresses an expectation for the behavior of the test file as a whole. The `assert.throws` helper function offers more fine-grained control over expectations because it may be applied to specific statements and expressions. This makes it preferable in cases where it may be used (i.e. when the test body does not describe a syntax error or early error). Re-implement assertions for errors to use the `assert.throws` helper function wherever possible.
13 lines
411 B
JavaScript
13 lines
411 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
info: Single line comments are terminated by the LINE FEED (U+000A) character
|
|
es5id: 7.3_A3.1_T1
|
|
description: Insert LINE FEED (\u000A) into single line comment
|
|
---*/
|
|
|
|
assert.throws(Test262Error, function() {
|
|
eval("// single line \u000A throw new Test262Error();");
|
|
});
|