update baselines

This commit is contained in:
Arthur Ozga 2016-10-20 16:27:02 -07:00
parent ef9f4043c4
commit 1a41ebf542
3 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,58 @@
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(5,1): error TS2365: Operator '>' cannot be applied to types 'BrandedNum' and '0'.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(10,1): error TS2365: Operator '<' cannot be applied to types 'BrandedNum' and '0'.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(15,1): error TS2365: Operator '>=' cannot be applied to types 'BrandedNum' and '0'.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(20,1): error TS2365: Operator '<=' cannot be applied to types 'BrandedNum' and '0'.
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts (4 errors) ====
type BrandedNum = number & { __numberBrand: any };
var x : BrandedNum;
// operator >
x > 0;
~~~~~
!!! error TS2365: Operator '>' cannot be applied to types 'BrandedNum' and '0'.
x > <number>0;
x > <BrandedNum>0;
// operator <
x < 0;
~~~~~
!!! error TS2365: Operator '<' cannot be applied to types 'BrandedNum' and '0'.
x < <number>0;
x < <BrandedNum>0;
// operator >=
x >= 0;
~~~~~~
!!! error TS2365: Operator '>=' cannot be applied to types 'BrandedNum' and '0'.
x >= <number>0;
x >= <BrandedNum>0;
// operator <=
x <= 0;
~~~~~~
!!! error TS2365: Operator '<=' cannot be applied to types 'BrandedNum' and '0'.
x <= <number>0;
x <= <BrandedNum>0;
// operator ==
x == 0;
x == <number>0;
x == <BrandedNum>0;
// operator !=
x != 0;
x != <number>0;
x != <BrandedNum>0;
// operator ===
x === 0;
x === <number>0;
x === <BrandedNum>0;
// operator !==
x !== 0;
x !== <number>0;
x !== <BrandedNum>0;

View File

@ -0,0 +1,79 @@
//// [comparisonOperatorWithNumericLiteral.ts]
type BrandedNum = number & { __numberBrand: any };
var x : BrandedNum;
// operator >
x > 0;
x > <number>0;
x > <BrandedNum>0;
// operator <
x < 0;
x < <number>0;
x < <BrandedNum>0;
// operator >=
x >= 0;
x >= <number>0;
x >= <BrandedNum>0;
// operator <=
x <= 0;
x <= <number>0;
x <= <BrandedNum>0;
// operator ==
x == 0;
x == <number>0;
x == <BrandedNum>0;
// operator !=
x != 0;
x != <number>0;
x != <BrandedNum>0;
// operator ===
x === 0;
x === <number>0;
x === <BrandedNum>0;
// operator !==
x !== 0;
x !== <number>0;
x !== <BrandedNum>0;
//// [comparisonOperatorWithNumericLiteral.js]
var x;
// operator >
x > 0;
x > 0;
x > 0;
// operator <
x < 0;
x < 0;
x < 0;
// operator >=
x >= 0;
x >= 0;
x >= 0;
// operator <=
x <= 0;
x <= 0;
x <= 0;
// operator ==
x == 0;
x == 0;
x == 0;
// operator !=
x != 0;
x != 0;
x != 0;
// operator ===
x === 0;
x === 0;
x === 0;
// operator !==
x !== 0;
x !== 0;
x !== 0;

View File

@ -0,0 +1,42 @@
type BrandedNum = number & { __numberBrand: any };
var x : BrandedNum;
// operator >
x > 0;
x > <number>0;
x > <BrandedNum>0;
// operator <
x < 0;
x < <number>0;
x < <BrandedNum>0;
// operator >=
x >= 0;
x >= <number>0;
x >= <BrandedNum>0;
// operator <=
x <= 0;
x <= <number>0;
x <= <BrandedNum>0;
// operator ==
x == 0;
x == <number>0;
x == <BrandedNum>0;
// operator !=
x != 0;
x != <number>0;
x != <BrandedNum>0;
// operator ===
x === 0;
x === <number>0;
x === <BrandedNum>0;
// operator !==
x !== 0;
x !== <number>0;
x !== <BrandedNum>0;