Files
test-repo/tests/flow/arith/relational.js
T
Christopher Chedeau 3375cfe605 Move tests around (#454)
* new_tests

* move_all_clobbered_tests

* remove all the tests that no longer exist

* re-run flow tests

* Move all the flow tests to tests/flow and prettier to tests/

* Move prettier tests to their own folders

* Add jsfmt files

* run prettier snapshot tests
2017-01-24 14:35:37 -08:00

31 lines
614 B
JavaScript

/* @flow */
(1 < 2);
(1 < "foo"); // error
("foo" < 1); // error
("foo" < "bar");
(1 < {foo: 1}); // error
({foo: 1} < 1); // error
({foo: 1} < {foo: 1}); // error
("foo" < {foo: 1}); // error
({foo: 1} < "foo"); // error
var x = (null : ?number);
(1 < x); // 2 errors: null !~> number; undefined !~> number
(x < 1); // 2 errors: null !~> number; undefined !~> number
(null < null); // error
(undefined < null); // error
(null < undefined); // error
(undefined < undefined); // error
(NaN < 1);
(1 < NaN);
(NaN < NaN);
let tests = [
function(x: any, y: number, z: string) {
(x > y);
(x > z);
},
];