Skip to content

Commit

Permalink
add brackets to logical expression (fix #1629)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaBecker committed Mar 7, 2019
1 parent e76bd2e commit ed78485
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/test_array_access.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://github.com/espruino/Espruino/issues/290
var arr = ["a"];
result = ((arr[true] === undefined) === true) &&
((arr[false] === undefined) === true);
result = (((arr[true] === undefined) === true) &&
((arr[false] === undefined) === true));
4 changes: 2 additions & 2 deletions tests/test_array_big_indices.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ objb["1233456789012345"]=true;
var rb = JSON.stringify(objb);


result = ra=="{\"1233456789012345\":\"yes\"}" &&
rb=="{\"1233456789012345\":true}";
result = ( ra=="{\"1233456789012345\":\"yes\"}" &&
rb=="{\"1233456789012345\":true}" );
4 changes: 2 additions & 2 deletions tests/test_function_length.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@


result = (function () {}).length === 0 &&
result = ((function () {}).length === 0 &&
(function (a) {}).length === 1 &&
(function (a,b) {}).length === 2 &&
(function (a,b,c,d,e,f,g,h) {}).length === 8;
(function (a,b,c,d,e,f,g,h) {})).length === 8;


4 changes: 2 additions & 2 deletions tests/test_object_proto.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/espruino/Espruino/issues/381

result =
result = (
Array.prototype === [].__proto__ &&
String.prototype === "".__proto__ &&
Number.prototype === (5).__proto__;
Number.prototype === (5).__proto__ );

0 comments on commit ed78485

Please sign in to comment.