Skip to content

Commit

Permalink
[flow] Move tests/binary to tests/in since it's only testing the in
Browse files Browse the repository at this point in the history
… operator

Summary:
Move tests/binary to tests/in since it's only testing the `in` operator.

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D67107746

fbshipit-source-id: 2028e66bec2305dfb3365c120ed43d5643e245e6
  • Loading branch information
gkz authored and facebook-github-bot committed Dec 13, 2024
1 parent d41d995 commit e084dc2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
File renamed without changes.
28 changes: 14 additions & 14 deletions tests/binary/binary.exp → tests/in/in.exp
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
Error ------------------------------------------------------------------------------------------------------ in.js:25:15
Error ---------------------------------------------------------------------------------------------------- test.js:25:15

Cannot use `in` because on the right-hand side, number [1] must be an object or array. [invalid-in-rhs]

25| ('foo' in 123); // error
^^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:26:15
Error ---------------------------------------------------------------------------------------------------- test.js:26:15

Cannot use `in` because on the right-hand side, string [1] must be an object or array. [invalid-in-rhs]

26| ('foo' in 'bar'); // error
^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:27:15
Error ---------------------------------------------------------------------------------------------------- test.js:27:15

Cannot use `in` because on the right-hand side, undefined [1] must be an object or array. [invalid-in-rhs]

27| ('foo' in void 0); // error
^^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:28:15
Error ---------------------------------------------------------------------------------------------------- test.js:28:15

Cannot use `in` because on the right-hand side, null [1] must be an object or array. [invalid-in-rhs]

28| ('foo' in null); // error
^^^^ [1]


Error ------------------------------------------------------------------------------------------------------- in.js:33:6
Error ----------------------------------------------------------------------------------------------------- test.js:33:6

Cannot use `in` because on the left-hand side, null [1] must be a string or number. [invalid-in-lhs]

33| (null in {}); // error
^^^^ [1]


Error ------------------------------------------------------------------------------------------------------- in.js:34:6
Error ----------------------------------------------------------------------------------------------------- test.js:34:6

Cannot use `in` because on the left-hand side, undefined [1] must be a string or number. [invalid-in-lhs]

34| (void 0 in {}); // error
^^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------- in.js:35:6
Error ----------------------------------------------------------------------------------------------------- test.js:35:6

Cannot use `in` because on the left-hand side, object literal [1] must be a string or number. [invalid-in-lhs]

35| ({} in {}); // error
^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:36:11
Error ---------------------------------------------------------------------------------------------------- test.js:36:11

Cannot use `in` because on the left-hand side, array type [1] must be a string or number. [invalid-in-lhs]

36| (([]: Array<string>) in {}); // error
^^^^^^^^^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------- in.js:37:6
Error ----------------------------------------------------------------------------------------------------- test.js:37:6

Cannot use `in` because on the left-hand side, boolean [1] must be a string or number. [invalid-in-lhs]

37| (false in ([]: Array<string>)); // error
^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:42:18
Error ---------------------------------------------------------------------------------------------------- test.js:42:18

Cannot use `in` because on the right-hand side, number [1] must be an object or array. [invalid-in-rhs]

42| if ('foo' in 123) {} // error
^^^ [1]


Error ------------------------------------------------------------------------------------------------------- in.js:43:9
Error ----------------------------------------------------------------------------------------------------- test.js:43:9

Cannot use `in` because on the left-hand side, boolean literal `false` [1] must be a string or number. [invalid-in-lhs]

43| if (!'foo' in {}) {} // error, !'foo' is a boolean
^^^^^^ [1]


Error ------------------------------------------------------------------------------------------------------ in.js:50:15
Error ---------------------------------------------------------------------------------------------------- test.js:50:15

Cannot use `in` because on the right-hand side, mixed [1] must be an object or array. [invalid-in-rhs]

in.js:50:15
test.js:50:15
50| ('foo' in y); // error
^

References:
in.js:48:26
test.js:48:26
48| function(x: Object, y: mixed) {
^^^^^ [1]

Expand Down
File renamed without changes.

0 comments on commit e084dc2

Please sign in to comment.