Skip to content

Commit 2ac41f4

Browse files
Add More Test Cases from test262
1 parent d3a82ed commit 2ac41f4

File tree

1,165 files changed

+40251
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,165 files changed

+40251
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
7.8.3-1gs.ts(14,9): error TS1121: Octal literals are not allowed. Use the syntax '0o10'.
2+
3+
4+
==== 7.8.3-1gs.ts (1 errors) ====
5+
// Copyright (c) 2012 Ecma International. All rights reserved.
6+
// This code is governed by the BSD license found in the LICENSE file.
7+
8+
/*---
9+
es5id: 7.8.3-1gs
10+
description: Strict Mode - octal extension(010) is forbidden in strict mode
11+
negative:
12+
phase: parse
13+
type: SyntaxError
14+
flags: [onlyStrict]
15+
---*/
16+
17+
18+
var y = 010;
19+
~~~
20+
!!! error TS1121: Octal literals are not allowed. Use the syntax '0o10'.
21+
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////
2+
3+
//// [7.8.3-1gs.ts]
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-1gs
9+
description: Strict Mode - octal extension(010) is forbidden in strict mode
10+
negative:
11+
phase: parse
12+
type: SyntaxError
13+
flags: [onlyStrict]
14+
---*/
15+
16+
17+
var y = 010;
18+
19+
20+
//// [7.8.3-1gs.js]
21+
// Copyright (c) 2012 Ecma International. All rights reserved.
22+
// This code is governed by the BSD license found in the LICENSE file.
23+
/*---
24+
es5id: 7.8.3-1gs
25+
description: Strict Mode - octal extension(010) is forbidden in strict mode
26+
negative:
27+
phase: parse
28+
type: SyntaxError
29+
flags: [onlyStrict]
30+
---*/
31+
var y = 8;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////
2+
3+
=== 7.8.3-1gs.ts ===
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-1gs
9+
description: Strict Mode - octal extension(010) is forbidden in strict mode
10+
negative:
11+
phase: parse
12+
type: SyntaxError
13+
flags: [onlyStrict]
14+
---*/
15+
16+
17+
var y = 010;
18+
>y : Symbol(y, Decl(7.8.3-1gs.ts, 13, 3))
19+
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////
2+
3+
=== 7.8.3-1gs.ts ===
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-1gs
9+
description: Strict Mode - octal extension(010) is forbidden in strict mode
10+
negative:
11+
phase: parse
12+
type: SyntaxError
13+
flags: [onlyStrict]
14+
---*/
15+
16+
17+
var y = 010;
18+
>y : number
19+
>010 : 8
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
7.8.3-2gs.ts(18,5): error TS1121: Octal literals are not allowed. Use the syntax '0o1'.
2+
3+
4+
==== 7.8.3-2gs.ts (1 errors) ====
5+
// Copyright (c) 2012 Ecma International. All rights reserved.
6+
// This code is governed by the BSD license found in the LICENSE file.
7+
8+
/*---
9+
es5id: 7.8.3-2gs
10+
description: >
11+
Strict Mode - octal extension is forbidden in strict mode (after a
12+
hex number is assigned to a variable)
13+
negative:
14+
phase: parse
15+
type: SyntaxError
16+
flags: [onlyStrict]
17+
---*/
18+
19+
20+
var a;
21+
a = 0x1;
22+
a = 01;
23+
~~
24+
!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'.
25+
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////
2+
3+
//// [7.8.3-2gs.ts]
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-2gs
9+
description: >
10+
Strict Mode - octal extension is forbidden in strict mode (after a
11+
hex number is assigned to a variable)
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
flags: [onlyStrict]
16+
---*/
17+
18+
19+
var a;
20+
a = 0x1;
21+
a = 01;
22+
23+
24+
//// [7.8.3-2gs.js]
25+
// Copyright (c) 2012 Ecma International. All rights reserved.
26+
// This code is governed by the BSD license found in the LICENSE file.
27+
/*---
28+
es5id: 7.8.3-2gs
29+
description: >
30+
Strict Mode - octal extension is forbidden in strict mode (after a
31+
hex number is assigned to a variable)
32+
negative:
33+
phase: parse
34+
type: SyntaxError
35+
flags: [onlyStrict]
36+
---*/
37+
var a;
38+
a = 0x1;
39+
a = 1;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////
2+
3+
=== 7.8.3-2gs.ts ===
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-2gs
9+
description: >
10+
Strict Mode - octal extension is forbidden in strict mode (after a
11+
hex number is assigned to a variable)
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
flags: [onlyStrict]
16+
---*/
17+
18+
19+
var a;
20+
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))
21+
22+
a = 0x1;
23+
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))
24+
25+
a = 01;
26+
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))
27+
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////
2+
3+
=== 7.8.3-2gs.ts ===
4+
// Copyright (c) 2012 Ecma International. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
es5id: 7.8.3-2gs
9+
description: >
10+
Strict Mode - octal extension is forbidden in strict mode (after a
11+
hex number is assigned to a variable)
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
flags: [onlyStrict]
16+
---*/
17+
18+
19+
var a;
20+
>a : any
21+
22+
a = 0x1;
23+
>a = 0x1 : 1
24+
>a : any
25+
>0x1 : 1
26+
27+
a = 01;
28+
>a = 01 : 1
29+
>a : any
30+
>01 : 1
31+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
S7.8.3_A6.1_T1.ts(15,3): error TS1125: Hexadecimal digit expected.
2+
3+
4+
==== S7.8.3_A6.1_T1.ts (1 errors) ====
5+
// Copyright 2009 the Sputnik authors. All rights reserved.
6+
// This code is governed by the BSD license found in the LICENSE file.
7+
8+
/*---
9+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
10+
es5id: 7.8.3_A6.1_T1
11+
description: Checking if execution of "0x" passes
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
---*/
16+
17+
18+
//CHECK#1
19+
0x
20+
21+
!!! error TS1125: Hexadecimal digit expected.
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////
2+
3+
//// [S7.8.3_A6.1_T1.ts]
4+
// Copyright 2009 the Sputnik authors. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
9+
es5id: 7.8.3_A6.1_T1
10+
description: Checking if execution of "0x" passes
11+
negative:
12+
phase: parse
13+
type: SyntaxError
14+
---*/
15+
16+
17+
//CHECK#1
18+
0x
19+
20+
21+
//// [S7.8.3_A6.1_T1.js]
22+
// Copyright 2009 the Sputnik authors. All rights reserved.
23+
// This code is governed by the BSD license found in the LICENSE file.
24+
/*---
25+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
26+
es5id: 7.8.3_A6.1_T1
27+
description: Checking if execution of "0x" passes
28+
negative:
29+
phase: parse
30+
type: SyntaxError
31+
---*/
32+
//CHECK#1
33+
0x;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////
2+
3+
=== S7.8.3_A6.1_T1.ts ===
4+
5+
// Copyright 2009 the Sputnik authors. All rights reserved.
6+
// This code is governed by the BSD license found in the LICENSE file.
7+
8+
/*---
9+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
10+
es5id: 7.8.3_A6.1_T1
11+
description: Checking if execution of "0x" passes
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
---*/
16+
17+
18+
//CHECK#1
19+
0x
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////
2+
3+
=== S7.8.3_A6.1_T1.ts ===
4+
// Copyright 2009 the Sputnik authors. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
9+
es5id: 7.8.3_A6.1_T1
10+
description: Checking if execution of "0x" passes
11+
negative:
12+
phase: parse
13+
type: SyntaxError
14+
---*/
15+
16+
17+
//CHECK#1
18+
0x
19+
>0x : 0
20+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
S7.8.3_A6.1_T2.ts(15,3): error TS1125: Hexadecimal digit expected.
2+
3+
4+
==== S7.8.3_A6.1_T2.ts (1 errors) ====
5+
// Copyright 2009 the Sputnik authors. All rights reserved.
6+
// This code is governed by the BSD license found in the LICENSE file.
7+
8+
/*---
9+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
10+
es5id: 7.8.3_A6.1_T2
11+
description: Checking if execution of "0X" passes
12+
negative:
13+
phase: parse
14+
type: SyntaxError
15+
---*/
16+
17+
18+
//CHECK#1
19+
0X
20+
21+
!!! error TS1125: Hexadecimal digit expected.
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts] ////
2+
3+
//// [S7.8.3_A6.1_T2.ts]
4+
// Copyright 2009 the Sputnik authors. All rights reserved.
5+
// This code is governed by the BSD license found in the LICENSE file.
6+
7+
/*---
8+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
9+
es5id: 7.8.3_A6.1_T2
10+
description: Checking if execution of "0X" passes
11+
negative:
12+
phase: parse
13+
type: SyntaxError
14+
---*/
15+
16+
17+
//CHECK#1
18+
0X
19+
20+
21+
//// [S7.8.3_A6.1_T2.js]
22+
// Copyright 2009 the Sputnik authors. All rights reserved.
23+
// This code is governed by the BSD license found in the LICENSE file.
24+
/*---
25+
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
26+
es5id: 7.8.3_A6.1_T2
27+
description: Checking if execution of "0X" passes
28+
negative:
29+
phase: parse
30+
type: SyntaxError
31+
---*/
32+
//CHECK#1
33+
0X;

0 commit comments

Comments
 (0)