Skip to content

Commit 65530c5

Browse files
author
Esben Sparre Andreasen
committed
JS: add test for js/useless-comparison-test
1 parent 55fd948 commit 65530c5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
| constant.js:2:7:2:11 | 1 > 2 | The condition '1 > 2' is always false. |
22
| constant.js:3:7:3:11 | 1 > 0 | The condition '1 > 0' is always true. |
33
| example.js:8:7:8:13 | i < end | The condition 'i < end' is always false. |
4+
| tst.js:8:23:8:33 | i == 100000 | The condition 'i == 100000' is always false. |
5+
| tst.js:9:23:9:33 | i == 100000 | The condition 'i == 100000' is always false. |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(function(p = 1) {
2+
if (p > 0) {
3+
} else {
4+
}
5+
});
6+
7+
(function(){
8+
(function (i) { if (i == 100000) return; })(1);
9+
(function f(i) { if (i == 100000) return; f(i+1); })(1);
10+
});

0 commit comments

Comments
 (0)