diff --git a/tests/baselines/reference/symbolType1.errors.txt b/tests/baselines/reference/symbolType1.errors.txt new file mode 100644 index 00000000000..db535f57625 --- /dev/null +++ b/tests/baselines/reference/symbolType1.errors.txt @@ -0,0 +1,11 @@ +tests/cases/conformance/es6/Symbols/symbolType1.ts(1,1): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/es6/Symbols/symbolType1.ts(2,19): error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. + + +==== tests/cases/conformance/es6/Symbols/symbolType1.ts (2 errors) ==== + Symbol() instanceof Symbol; + ~~~~~~~~ +!!! error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. + Symbol instanceof Symbol(); + ~~~~~~~~ +!!! error TS2359: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType1.js b/tests/baselines/reference/symbolType1.js new file mode 100644 index 00000000000..a3b00871c4e --- /dev/null +++ b/tests/baselines/reference/symbolType1.js @@ -0,0 +1,7 @@ +//// [symbolType1.ts] +Symbol() instanceof Symbol; +Symbol instanceof Symbol(); + +//// [symbolType1.js] +Symbol() instanceof Symbol; +Symbol instanceof Symbol(); diff --git a/tests/baselines/reference/symbolType10.errors.txt b/tests/baselines/reference/symbolType10.errors.txt new file mode 100644 index 00000000000..852f863bae8 --- /dev/null +++ b/tests/baselines/reference/symbolType10.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/es6/Symbols/symbolType10.ts(2,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(2,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(3,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(3,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(4,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(4,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType10.ts(7,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/Symbols/symbolType10.ts (8 errors) ==== + var s = Symbol.for("bitwise"); + s & s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s | s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s ^ s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + s & 0; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 0 | s; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType10.js b/tests/baselines/reference/symbolType10.js new file mode 100644 index 00000000000..378479fb70f --- /dev/null +++ b/tests/baselines/reference/symbolType10.js @@ -0,0 +1,16 @@ +//// [symbolType10.ts] +var s = Symbol.for("bitwise"); +s & s; +s | s; +s ^ s; + +s & 0; +0 | s; + +//// [symbolType10.js] +var s = Symbol.for("bitwise"); +s & s; +s | s; +s ^ s; +s & 0; +0 | s; diff --git a/tests/baselines/reference/symbolType11.js b/tests/baselines/reference/symbolType11.js new file mode 100644 index 00000000000..3328be28d15 --- /dev/null +++ b/tests/baselines/reference/symbolType11.js @@ -0,0 +1,17 @@ +//// [symbolType11.ts] +var s = Symbol.for("logical"); +s && s; +s && []; +0 && s; +s || s; +s || 1; +({}) || s; + +//// [symbolType11.js] +var s = Symbol.for("logical"); +s && s; +s && []; +0 && s; +s || s; +s || 1; +({}) || s; diff --git a/tests/baselines/reference/symbolType12.js b/tests/baselines/reference/symbolType12.js new file mode 100644 index 00000000000..05d7fa03eb6 --- /dev/null +++ b/tests/baselines/reference/symbolType12.js @@ -0,0 +1,55 @@ +//// [symbolType12.ts] +var s = Symbol.for("assign"); +var str = ""; +s *= s; +s *= 0; +s /= s; +s /= 0; +s %= s; +s %= 0; +s += s; +s += 0; +s += ""; +str += s; +s -= s; +s -= 0; +s <<= s; +s <<= 0; +s >>= s; +s >>= 0; +s >>>= s; +s >>>= 0; +s &= s; +s &= 0; +s ^= s; +s ^= 0; +s |= s; +s |= 0; + +//// [symbolType12.js] +var s = Symbol.for("assign"); +var str = ""; +s *= s; +s *= 0; +s /= s; +s /= 0; +s %= s; +s %= 0; +s += s; +s += 0; +s += ""; +str += s; +s -= s; +s -= 0; +s <<= s; +s <<= 0; +s >>= s; +s >>= 0; +s >>>= s; +s >>>= 0; +s &= s; +s &= 0; +s ^= s; +s ^= 0; +s |= s; +s |= 0; diff --git a/tests/baselines/reference/symbolType13.js b/tests/baselines/reference/symbolType13.js new file mode 100644 index 00000000000..56aef2cc8e6 --- /dev/null +++ b/tests/baselines/reference/symbolType13.js @@ -0,0 +1,17 @@ +//// [symbolType13.ts] +var s = Symbol(); +var x: any; + +for (s in {}) { } +for (x in s) { } +for (var y in s) { } + +//// [symbolType13.js] +var s = Symbol(); +var x; +for (s in {}) { +} +for (x in s) { +} +for (var y in s) { +} diff --git a/tests/baselines/reference/symbolType2.js b/tests/baselines/reference/symbolType2.js new file mode 100644 index 00000000000..e15e4da626e --- /dev/null +++ b/tests/baselines/reference/symbolType2.js @@ -0,0 +1,7 @@ +//// [symbolType2.ts] +Symbol.isConcatSpreadable in {}; +"" in Symbol.toPrimitive; + +//// [symbolType2.js] +Symbol.isConcatSpreadable in {}; +"" in Symbol.toPrimitive; diff --git a/tests/baselines/reference/symbolType3.js b/tests/baselines/reference/symbolType3.js new file mode 100644 index 00000000000..088449a3a89 --- /dev/null +++ b/tests/baselines/reference/symbolType3.js @@ -0,0 +1,23 @@ +//// [symbolType3.ts] +var s = Symbol(); +delete Symbol.iterator; +void Symbol.toPrimitive; +typeof Symbol.toStringTag; +++s; +--s; ++ Symbol(); +- Symbol(); +~ Symbol(); +! Symbol(); + +//// [symbolType3.js] +var s = Symbol(); +delete Symbol.iterator; +void Symbol.toPrimitive; +typeof Symbol.toStringTag; +++s; +--s; ++Symbol(); +-Symbol(); +~Symbol(); +!Symbol(); diff --git a/tests/baselines/reference/symbolType4.errors.txt b/tests/baselines/reference/symbolType4.errors.txt new file mode 100644 index 00000000000..210fe94b8d7 --- /dev/null +++ b/tests/baselines/reference/symbolType4.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/es6/Symbols/symbolType4.ts(2,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType4.ts(3,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/Symbols/symbolType4.ts (2 errors) ==== + var s = Symbol.for("postfix"); + s++; + ~ +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. + s--; + ~ +!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType4.js b/tests/baselines/reference/symbolType4.js new file mode 100644 index 00000000000..321de5a3bf9 --- /dev/null +++ b/tests/baselines/reference/symbolType4.js @@ -0,0 +1,9 @@ +//// [symbolType4.ts] +var s = Symbol.for("postfix"); +s++; +s--; + +//// [symbolType4.js] +var s = Symbol.for("postfix"); +s++; +s--; diff --git a/tests/baselines/reference/symbolType5.errors.txt b/tests/baselines/reference/symbolType5.errors.txt new file mode 100644 index 00000000000..af70aad0f26 --- /dev/null +++ b/tests/baselines/reference/symbolType5.errors.txt @@ -0,0 +1,34 @@ +tests/cases/conformance/es6/Symbols/symbolType5.ts(2,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(2,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(3,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(3,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(4,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(4,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType5.ts(7,5): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/Symbols/symbolType5.ts (8 errors) ==== + var s = Symbol.for("multiply"); + s * s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s / s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s % s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + s * 0; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + 0 / s; + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType5.js b/tests/baselines/reference/symbolType5.js new file mode 100644 index 00000000000..ce76e034bd9 --- /dev/null +++ b/tests/baselines/reference/symbolType5.js @@ -0,0 +1,16 @@ +//// [symbolType5.ts] +var s = Symbol.for("multiply"); +s * s; +s / s; +s % s; + +s * 0; +0 / s; + +//// [symbolType5.js] +var s = Symbol.for("multiply"); +s * s; +s / s; +s % s; +s * 0; +0 / s; diff --git a/tests/baselines/reference/symbolType6.js b/tests/baselines/reference/symbolType6.js new file mode 100644 index 00000000000..ad16baa28b4 --- /dev/null +++ b/tests/baselines/reference/symbolType6.js @@ -0,0 +1,21 @@ +//// [symbolType6.ts] +var s = Symbol.for("add"); +s + s; +s - s; +s + ""; +s + 0; +"" + s; +0 + s; +s - 0; +0 - s; + +//// [symbolType6.js] +var s = Symbol.for("add"); +s + s; +s - s; +s + ""; +s + 0; +"" + s; +0 + s; +s - 0; +0 - s; diff --git a/tests/baselines/reference/symbolType7.errors.txt b/tests/baselines/reference/symbolType7.errors.txt new file mode 100644 index 00000000000..80ecd2486ff --- /dev/null +++ b/tests/baselines/reference/symbolType7.errors.txt @@ -0,0 +1,37 @@ +tests/cases/conformance/es6/Symbols/symbolType7.ts(2,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(2,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(3,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(4,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(4,6): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(6,7): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/es6/Symbols/symbolType7.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/es6/Symbols/symbolType7.ts (9 errors) ==== + var s = Symbol.for("shift"); + s << s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s << 0; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s >> s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s >> 0; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s >>> s; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + s >>> 0; + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType7.js b/tests/baselines/reference/symbolType7.js new file mode 100644 index 00000000000..47ace567a3d --- /dev/null +++ b/tests/baselines/reference/symbolType7.js @@ -0,0 +1,17 @@ +//// [symbolType7.ts] +var s = Symbol.for("shift"); +s << s; +s << 0; +s >> s; +s >> 0; +s >>> s; +s >>> 0; + +//// [symbolType7.js] +var s = Symbol.for("shift"); +s << s; +s << 0; +s >> s; +s >> 0; +s >>> s; +s >>> 0; diff --git a/tests/baselines/reference/symbolType8.js b/tests/baselines/reference/symbolType8.js new file mode 100644 index 00000000000..e80dea220b9 --- /dev/null +++ b/tests/baselines/reference/symbolType8.js @@ -0,0 +1,21 @@ +//// [symbolType8.ts] +var s = Symbol.for("compare"); +s < s; +s < 0; +s > s; +s > 0; +s <= s; +s <= 0; +s >= s; +s >= 0; + +//// [symbolType8.js] +var s = Symbol.for("compare"); +s < s; +s < 0; +s > s; +s > 0; +s <= s; +s <= 0; +s >= s; +s >= 0; diff --git a/tests/baselines/reference/symbolType9.js b/tests/baselines/reference/symbolType9.js new file mode 100644 index 00000000000..c9b0c801cc8 --- /dev/null +++ b/tests/baselines/reference/symbolType9.js @@ -0,0 +1,21 @@ +//// [symbolType9.ts] +var s = Symbol.for("equal"); +s == s; +s == true; +s != s; +0 != s; +s === s; +s === 1; +s !== s; +false !== s; + +//// [symbolType9.js] +var s = Symbol.for("equal"); +s == s; +s == true; +s != s; +0 != s; +s === s; +s === 1; +s !== s; +false !== s; diff --git a/tests/baselines/reference/symbolType9.types b/tests/baselines/reference/symbolType9.types new file mode 100644 index 00000000000..f2d1af709ac --- /dev/null +++ b/tests/baselines/reference/symbolType9.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/es6/Symbols/symbolType9.ts === +var s = Symbol.for("equal"); +>s : Symbol +>Symbol.for("equal") : Symbol +>Symbol.for : (key: string) => Symbol +>Symbol : SymbolConstructor +>for : (key: string) => Symbol + +s == s; +>s == s : boolean +>s : Symbol +>s : Symbol + +s == true; +>s == true : boolean +>s : Symbol + +s != s; +>s != s : boolean +>s : Symbol +>s : Symbol + +0 != s; +>0 != s : boolean +>s : Symbol + +s === s; +>s === s : boolean +>s : Symbol +>s : Symbol + +s === 1; +>s === 1 : boolean +>s : Symbol + +s !== s; +>s !== s : boolean +>s : Symbol +>s : Symbol + +false !== s; +>false !== s : boolean +>s : Symbol + diff --git a/tests/cases/conformance/es6/Symbols/symbolType1.ts b/tests/cases/conformance/es6/Symbols/symbolType1.ts new file mode 100644 index 00000000000..3945ecc76e8 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType1.ts @@ -0,0 +1,3 @@ +//@target: ES6 +Symbol() instanceof Symbol; +Symbol instanceof Symbol(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType10.ts b/tests/cases/conformance/es6/Symbols/symbolType10.ts new file mode 100644 index 00000000000..a1ee87de159 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType10.ts @@ -0,0 +1,8 @@ +//@target: ES6 +var s = Symbol.for("bitwise"); +s & s; +s | s; +s ^ s; + +s & 0; +0 | s; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType11.ts b/tests/cases/conformance/es6/Symbols/symbolType11.ts new file mode 100644 index 00000000000..8b9661bb046 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType11.ts @@ -0,0 +1,8 @@ +//@target: ES6 +var s = Symbol.for("logical"); +s && s; +s && []; +0 && s; +s || s; +s || 1; +({}) || s; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType12.ts b/tests/cases/conformance/es6/Symbols/symbolType12.ts new file mode 100644 index 00000000000..7197c13497d --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType12.ts @@ -0,0 +1,27 @@ +//@target: ES6 +var s = Symbol.for("assign"); +var str = ""; +s *= s; +s *= 0; +s /= s; +s /= 0; +s %= s; +s %= 0; +s += s; +s += 0; +s += ""; +str += s; +s -= s; +s -= 0; +s <<= s; +s <<= 0; +s >>= s; +s >>= 0; +s >>>= s; +s >>>= 0; +s &= s; +s &= 0; +s ^= s; +s ^= 0; +s |= s; +s |= 0; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType13.ts b/tests/cases/conformance/es6/Symbols/symbolType13.ts new file mode 100644 index 00000000000..4b657c4c37a --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType13.ts @@ -0,0 +1,7 @@ +//@target: ES6 +var s = Symbol(); +var x: any; + +for (s in {}) { } +for (x in s) { } +for (var y in s) { } \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType2.ts b/tests/cases/conformance/es6/Symbols/symbolType2.ts new file mode 100644 index 00000000000..54954c17bd3 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType2.ts @@ -0,0 +1,3 @@ +//@target: ES6 +Symbol.isConcatSpreadable in {}; +"" in Symbol.toPrimitive; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType3.ts b/tests/cases/conformance/es6/Symbols/symbolType3.ts new file mode 100644 index 00000000000..ca098fe0695 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType3.ts @@ -0,0 +1,11 @@ +//@target: ES6 +var s = Symbol(); +delete Symbol.iterator; +void Symbol.toPrimitive; +typeof Symbol.toStringTag; +++s; +--s; ++ Symbol(); +- Symbol(); +~ Symbol(); +! Symbol(); \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType4.ts b/tests/cases/conformance/es6/Symbols/symbolType4.ts new file mode 100644 index 00000000000..bd5b5ba1a06 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType4.ts @@ -0,0 +1,4 @@ +//@target: ES6 +var s = Symbol.for("postfix"); +s++; +s--; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType5.ts b/tests/cases/conformance/es6/Symbols/symbolType5.ts new file mode 100644 index 00000000000..302cfcafdf3 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType5.ts @@ -0,0 +1,8 @@ +//@target: ES6 +var s = Symbol.for("multiply"); +s * s; +s / s; +s % s; + +s * 0; +0 / s; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType6.ts b/tests/cases/conformance/es6/Symbols/symbolType6.ts new file mode 100644 index 00000000000..b6f58ac5b29 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType6.ts @@ -0,0 +1,10 @@ +//@target: ES6 +var s = Symbol.for("add"); +s + s; +s - s; +s + ""; +s + 0; +"" + s; +0 + s; +s - 0; +0 - s; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType7.ts b/tests/cases/conformance/es6/Symbols/symbolType7.ts new file mode 100644 index 00000000000..841ca9e8b10 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType7.ts @@ -0,0 +1,8 @@ +//@target: ES6 +var s = Symbol.for("shift"); +s << s; +s << 0; +s >> s; +s >> 0; +s >>> s; +s >>> 0; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType8.ts b/tests/cases/conformance/es6/Symbols/symbolType8.ts new file mode 100644 index 00000000000..4970ae0a9ca --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType8.ts @@ -0,0 +1,10 @@ +//@target: ES6 +var s = Symbol.for("compare"); +s < s; +s < 0; +s > s; +s > 0; +s <= s; +s <= 0; +s >= s; +s >= 0; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolType9.ts b/tests/cases/conformance/es6/Symbols/symbolType9.ts new file mode 100644 index 00000000000..1fa43143640 --- /dev/null +++ b/tests/cases/conformance/es6/Symbols/symbolType9.ts @@ -0,0 +1,10 @@ +//@target: ES6 +var s = Symbol.for("equal"); +s == s; +s == true; +s != s; +0 != s; +s === s; +s === 1; +s !== s; +false !== s; \ No newline at end of file