Skip to content
Snippets Groups Projects
Commit 9f1d25c9 authored by Mike Pennisi's avatar Mike Pennisi
Browse files

Remove duplicative tests

The behavior asserted by the removed tests is covered by other files.

- test/language/line-terminators/7.3-1.js duplicates
  test/language/line-terminators/S7.3_A1.3.js
- test/language/line-terminators/7.3-2.js duplicates
  test/language/line-terminators/S7.3_A1.4.js
- test/language/line-terminators/7.3-3.js duplicates
  test/language/line-terminators/S7.3_A3.3_T1.js
- test/language/line-terminators/7.3-4.js duplicates
  test/language/line-terminators/S7.3_A3.4_T1.js
- test/language/line-terminators/7.3-9.js duplicates
  test/language/line-terminators/S7.3_A6_T3.js
- test/language/line-terminators/7.3-10.js  duplicates
  test/language/line-terminators/S7.3_A6_T4.js
- test/language/line-terminators/S7.3_A1.1_T1.js duplicates
  test/language/line-terminators/S7.3_A1.1_T2.js
- test/language/line-terminators/S7.3_A1.2_T1.js duplicates
  test/language/line-terminators/S7.3_A1.2_T2.js
- test/language/line-terminators/S7.3_A3.1_T2.js duplicates
  test/language/line-terminators/S7.3_A3.1_T3.js
- test/language/line-terminators/S7.3_A3.2_T3.js duplicates
  test/language/line-terminators/S7.3_A3.2_T1.js
- test/language/line-terminators/S7.3_A3.3_T2.js duplicates
  test/language/line-terminators/S7.3_A3.3_T1.js
- test/language/line-terminators/S7.3_A3.4_T2.js duplicates
  test/language/line-terminators/S7.3_A3.4_T1.js
- test/language/line-terminators/S7.3_A4_T1.js duplicates
  test/language/line-terminators/S7.3_A3.1_T1.js
- test/language/line-terminators/S7.3_A5.1_T1.js duplicates
  test/language/line-terminators/S7.3_A5.1_T2.js
- test/language/line-terminators/S7.3_A5.2_T1.js duplicates
  test/language/line-terminators/S7.3_A5.2_T2.js
parent 23594b81
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 275 deletions
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-1
description: >
7.3 - ES5 recognizes the character <LS> (\u2028) as line
terminators when parsing statements
---*/
var test7_3_1, prop;
eval("test7_3_1\u2028prop = 66;");
assert.sameValue(prop, 66, 'prop');
assert.sameValue((typeof test7_3_1), "undefined", '(typeof test7_3_1)');
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-10
description: >
7.3 - ES5 recognizes the character <PS> (\u2029) as a
NonEscapeCharacter
---*/
assert.throws(SyntaxError, function() {
eval("var prop = \\u2029;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-2
description: >
7.3 - ES5 recognizes the character <PS> (\u2029) as line
terminators when parsing statements
---*/
var test7_3_2, prop;
eval("test7_3_2\u2029prop = 66;");
assert.sameValue(prop, 66, 'prop');
assert.sameValue((typeof test7_3_2), "undefined", '(typeof test7_3_2)');
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-3
description: >
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
SingleLineComments
---*/
assert.throws(SyntaxError, function() {
eval("//Single Line Comments\u2028 var =;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-4
description: >
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
SingleLineComments
---*/
assert.throws(SyntaxError, function() {
eval("//Single Line Comments\u2029 var =;");
});
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.3-9
description: >
7.3 - ES5 recognizes the character <LS> (\u2028) as a
NonEscapeCharacter
---*/
assert.throws(SyntaxError, function() {
eval("var prop = \\u2028;");
});
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: LINE FEED (U+000A) may occur between any two tokens
es5id: 7.3_A1.1_T1
description: Insert LINE FEED (\u000A and \n) between tokens of var x=1
---*/
var result;
// CHECK#1
eval("\u000Avar\u000Ax\u000A=\u000A1\u000A; result = x;");
if (result !== 1) {
$ERROR('#1: eval("\\u000Avar\\u000Ax\\u000A=\\u000A1\\u000A; result = x;"); result === 1. Actual: ' + (result));
}
//CHECK#2
eval("\u000A" + "var" + "\u000A" + "x" + "\u000A" + "=" + "\u000A" + "2" + "\u000A; result = x;");
if (result !== 2) {
$ERROR('#2: eval("\\u000A" + "var" + "\\u000A" + "x" + "\\u000A" + "=" + "\\u000A" + "2" + "\\u000A; result = x;"); result === 2. Actual: ' + (result));
}
//CHECK#3
eval("\nvar\nx\n=\n3\n; result = x;");
if (result !== 3) {
$ERROR('#3: eval("\\nvar\\nx\\n=\\n3\\n; result = x;"); result === 3. Actual: ' + (result));
}
//CHECK#4
eval("\n" + "var" + "\n" + "x" + "\n" + "=" + "\n" + "4" + "\n; result = x;");
if (result !== 4) {
$ERROR('#4: eval("\\n" + "var" + "\\n" + "x" + "\\n" + "=" + "\\n" + "4" + "\\n; result = x;"); result === 4. Actual: ' + (result));
}
//CHECK#5
eval("\u000A" + "var" + "\n" + "x" + "\u000A" + "=" + "\n" + "5" + "\u000A; result = x;");
if (result !== 5) {
$ERROR('#5: eval("\\u000A" + "var" + "\\n" + "x" + "\\u000A" + "=" + "\\n" + "5" + "\\u000A; result = x;"); result === 5. Actual: ' + (result));
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: CARRIAGE RETURN (U+000D) may occur between any two tokens
es5id: 7.3_A1.2_T1
description: Insert CARRIAGE RETURN (\u000D and \r) between tokens of var x=1
---*/
var result;
// CHECK#1
eval("\u000Dvar\u000Dx\u000D=\u000D1\u000D; result = x;");
if (result !== 1) {
$ERROR('#1: eval("\\u000Dvar\\u000Dx\\u000D=\\u000D1\\u000D"); result === 1. Actual: ' + (result));
}
//CHECK#2
eval("\u000D" + "var" + "\u000D" + "x" + "\u000D" + "=" + "\u000D" + "2" + "\u000D; result = x;");
if (result !== 2) {
$ERROR('#2: eval("\\u000D" + "var" + "\\u000D" + "x" + "\\u000D" + "=" + "\\u000D" + "2" + "\\u000D"); result === 2. Actual: ' + (result));
}
//CHECK#3
eval("\rvar\rx\r=\r3\r; result = x;");
if (result !== 3) {
$ERROR('#3: eval("\\rvar\\rx\\r=\\r3\\r"); result === 3. Actual: ' + (result));
}
//CHECK#4
eval("\r" + "var" + "\r" + "x" + "\r" + "=" + "\r" + "4" + "\r; result = x;");
if (result !== 4) {
$ERROR('#4: eval("\\r" + "var" + "\\r" + "x" + "\\r" + "=" + "\\r" + "4" + "\\r"); result === 4. Actual: ' + (result));
}
//CHECK#5
eval("\u000D" + "var" + "\r" + "x" + "\u000D" + "=" + "\r" + "5" + "\u000D; result = x;");
if (result !== 5) {
$ERROR('#5: eval("\\u000D" + "var" + "\\r" + "x" + "\\u000D" + "=" + "\\r" + "5" + "\\u000D"); result === 5. Actual: ' + (result));
}
// 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 can not contain LINE FEED (U+000A) inside
es5id: 7.3_A3.1_T2
description: Insert LINE FEED (\u000A) into begin of single line comment
---*/
assert.throws(SyntaxError, function() {
eval("//\u000A single line comment");
});
// 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 can not contain CARRIAGE RETURN (U+000D) inside
es5id: 7.3_A3.2_T3
description: Insert real CARRIAGE RETURN into single line comment
negative:
phase: parse
type: SyntaxError
---*/
$DONOTEVALUATE();
// CHECK#1
//single
line comment
// 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 can not contain LINE SEPARATOR (U+2028) inside
es5id: 7.3_A3.3_T2
description: Insert LINE SEPARATOR (\u2028) into begin of single line comment
---*/
assert.throws(SyntaxError, function() {
eval("//\u2028 single line comment");
});
// 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 can not contain PARAGRAPH SEPARATOR (U+2029) inside
es5id: 7.3_A3.4_T2
description: >
Insert PARAGRAPH SEPARATOR (\u2029) into begin of single line
comment
---*/
assert.throws(SyntaxError, function() {
eval("//\u2029 single line comment");
});
// 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 can contain Line Terminator at the end of line
es5id: 7.3_A4_T1
description: Insert LINE FEED (U+000A) into the end of single line comment
---*/
// CHECK#1
eval("// single line comment\u000A");
// CHECK#2
var x = 0;
eval("// single line comment\u000A x = 1;");
if (x !== 1) {
$ERROR('#1: var x = 0; eval("// single line comment\\u000A x = 1;"); x === 1. Actual: ' + (x));
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Multi line comment can contain LINE FEED (U+000A)
es5id: 7.3_A5.1_T1
description: Insert LINE FEED (U+000A) into multi line comment
---*/
// CHECK#1
eval("/*\u000A multi line \u000A comment \u000A*/");
//CHECK#2
var x = 0;
eval("/*\u000A multi line \u000A comment \u000A x = 1;*/");
if (x !== 0) {
$ERROR('#1: var x = 0; eval("/*\\u000A multi line \\u000A comment \\u000A x = 1;*/"); x === 0. Actual: ' + (x));
}
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: Multi line comment can contain CARRIAGE RETURN (U+000D)
es5id: 7.3_A5.2_T1
description: Insert CARRIAGE RETURN (U+000D) into multi line comment
---*/
// CHECK#1
eval("/*\u000D multi line \u000D comment \u000D*/");
//CHECK#2
var x = 0;
eval("/*\u000D multi line \u000D comment \u000D x = 1;*/");
if (x !== 0) {
$ERROR('#1: var x = 0; eval("/*\\u000D multi line \\u000D comment \\u000D x = 1;*/"); x === 0. Actual: ' + (x));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment