Skip to content

Commit ed78485

Browse files
committed
add brackets to logical expression (fix #1629)
1 parent e76bd2e commit ed78485

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

tests/test_array_access.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// https://github.com/espruino/Espruino/issues/290
22
var arr = ["a"];
3-
result = ((arr[true] === undefined) === true) &&
4-
((arr[false] === undefined) === true);
3+
result = (((arr[true] === undefined) === true) &&
4+
((arr[false] === undefined) === true));

tests/test_array_big_indices.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ objb["1233456789012345"]=true;
99
var rb = JSON.stringify(objb);
1010

1111

12-
result = ra=="{\"1233456789012345\":\"yes\"}" &&
13-
rb=="{\"1233456789012345\":true}";
12+
result = ( ra=="{\"1233456789012345\":\"yes\"}" &&
13+
rb=="{\"1233456789012345\":true}" );

tests/test_function_length.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22

3-
result = (function () {}).length === 0 &&
3+
result = ((function () {}).length === 0 &&
44
(function (a) {}).length === 1 &&
55
(function (a,b) {}).length === 2 &&
6-
(function (a,b,c,d,e,f,g,h) {}).length === 8;
6+
(function (a,b,c,d,e,f,g,h) {})).length === 8;
77

88

tests/test_object_proto.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// https://github.com/espruino/Espruino/issues/381
22

3-
result =
3+
result = (
44
Array.prototype === [].__proto__ &&
55
String.prototype === "".__proto__ &&
6-
Number.prototype === (5).__proto__;
6+
Number.prototype === (5).__proto__ );

0 commit comments

Comments
 (0)