Skip to content

Commit

Permalink
Add More Test Cases from test262
Browse files Browse the repository at this point in the history
  • Loading branch information
graphemecluster committed Sep 1, 2023
1 parent 3b16d74 commit fefcf29
Show file tree
Hide file tree
Showing 1,165 changed files with 40,251 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/baselines/reference/7.8.3-1gs.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
7.8.3-1gs.ts(14,9): error TS1121: Octal literals are not allowed. Use the syntax '0o10'.


==== 7.8.3-1gs.ts (1 errors) ====
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var y = 010;
~~~
!!! error TS1121: Octal literals are not allowed. Use the syntax '0o10'.

31 changes: 31 additions & 0 deletions tests/baselines/reference/7.8.3-1gs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////

//// [7.8.3-1gs.ts]
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var y = 010;


//// [7.8.3-1gs.js]
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var y = 8;
19 changes: 19 additions & 0 deletions tests/baselines/reference/7.8.3-1gs.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////

=== 7.8.3-1gs.ts ===
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var y = 010;
>y : Symbol(y, Decl(7.8.3-1gs.ts, 13, 3))

20 changes: 20 additions & 0 deletions tests/baselines/reference/7.8.3-1gs.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-1gs.ts] ////

=== 7.8.3-1gs.ts ===
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var y = 010;
>y : number
>010 : 8

25 changes: 25 additions & 0 deletions tests/baselines/reference/7.8.3-2gs.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
7.8.3-2gs.ts(18,5): error TS1121: Octal literals are not allowed. Use the syntax '0o1'.


==== 7.8.3-2gs.ts (1 errors) ====
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-2gs
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var a;
a = 0x1;
a = 01;
~~
!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'.

39 changes: 39 additions & 0 deletions tests/baselines/reference/7.8.3-2gs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////

//// [7.8.3-2gs.ts]
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-2gs
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var a;
a = 0x1;
a = 01;


//// [7.8.3-2gs.js]
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 7.8.3-2gs
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/
var a;
a = 0x1;
a = 1;
27 changes: 27 additions & 0 deletions tests/baselines/reference/7.8.3-2gs.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////

=== 7.8.3-2gs.ts ===
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-2gs
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var a;
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))

a = 0x1;
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))

a = 01;
>a : Symbol(a, Decl(7.8.3-2gs.ts, 15, 3))

31 changes: 31 additions & 0 deletions tests/baselines/reference/7.8.3-2gs.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//// [tests/cases/conformance/test262/language/literals/numeric/7.8.3-2gs.ts] ////

=== 7.8.3-2gs.ts ===
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 7.8.3-2gs
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
---*/


var a;
>a : any

a = 0x1;
>a = 0x1 : 1
>a : any
>0x1 : 1

a = 01;
>a = 01 : 1
>a : any
>01 : 1

22 changes: 22 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T1.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
S7.8.3_A6.1_T1.ts(15,3): error TS1125: Hexadecimal digit expected.


==== S7.8.3_A6.1_T1.ts (1 errors) ====
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T1
description: Checking if execution of "0x" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0x

!!! error TS1125: Hexadecimal digit expected.

33 changes: 33 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////

//// [S7.8.3_A6.1_T1.ts]
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T1
description: Checking if execution of "0x" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0x


//// [S7.8.3_A6.1_T1.js]
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T1
description: Checking if execution of "0x" passes
negative:
phase: parse
type: SyntaxError
---*/
//CHECK#1
0x;
20 changes: 20 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T1.symbols
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////

=== S7.8.3_A6.1_T1.ts ===

// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T1
description: Checking if execution of "0x" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0x

20 changes: 20 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T1.types
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T1.ts] ////

=== S7.8.3_A6.1_T1.ts ===
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T1
description: Checking if execution of "0x" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0x
>0x : 0

22 changes: 22 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T2.errors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
S7.8.3_A6.1_T2.ts(15,3): error TS1125: Hexadecimal digit expected.


==== S7.8.3_A6.1_T2.ts (1 errors) ====
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T2
description: Checking if execution of "0X" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0X

!!! error TS1125: Hexadecimal digit expected.

33 changes: 33 additions & 0 deletions tests/baselines/reference/S7.8.3_A6.1_T2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//// [tests/cases/conformance/test262/language/literals/numeric/S7.8.3_A6.1_T2.ts] ////

//// [S7.8.3_A6.1_T2.ts]
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T2
description: Checking if execution of "0X" passes
negative:
phase: parse
type: SyntaxError
---*/


//CHECK#1
0X


//// [S7.8.3_A6.1_T2.js]
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: "HexIntegerLiteral :: 0(x/X) is incorrect"
es5id: 7.8.3_A6.1_T2
description: Checking if execution of "0X" passes
negative:
phase: parse
type: SyntaxError
---*/
//CHECK#1
0X;
Loading

0 comments on commit fefcf29

Please sign in to comment.