diff --git a/javascript/ql/test/library-tests/Constants/Constants.expected b/javascript/ql/test/library-tests/Constants/Constants.expected index 75a63830277..35ce0fc93ff 100644 --- a/javascript/ql/test/library-tests/Constants/Constants.expected +++ b/javascript/ql/test/library-tests/Constants/Constants.expected @@ -1,3 +1,33 @@ +getIntValue +| tst2.ts:1:21:1:21 | 1 | 1 | +| tst.js:6:1:6:1 | 1 | 1 | +| tst.js:11:1:11:2 | -1 | -1 | +| tst.js:11:2:11:2 | 1 | 1 | +| tst.js:12:2:12:2 | 0 | 0 | +| tst.js:26:3:26:3 | 0 | 0 | +| tst.js:29:6:29:6 | 0 | 0 | +| tst.js:35:1:35:1 | 1 | 1 | +| tst.js:35:5:35:5 | 2 | 2 | +| tst.js:35:9:35:9 | 3 | 3 | +| tst.js:37:1:37:3 | (1) | 1 | +| tst.js:37:2:37:2 | 1 | 1 | +| tst.js:39:4:39:4 | 1 | 1 | +| tst.js:40:1:40:1 | 1 | 1 | +| tst.js:42:1:42:1 | 1 | 1 | +| tst.js:42:4:42:4 | 2 | 2 | +| tst.js:42:7:42:7 | 3 | 3 | +| tst.js:43:4:43:4 | 2 | 2 | +| tst.js:43:7:43:7 | 3 | 3 | +| tst.js:44:1:44:1 | 1 | 1 | +| tst.js:44:7:44:7 | 3 | 3 | +| tst.js:45:1:45:1 | 1 | 1 | +| tst.js:45:4:45:4 | 2 | 2 | +| tst.js:47:5:47:5 | 1 | 1 | +| tst.js:48:7:48:7 | 1 | 1 | +| tst.js:49:6:49:6 | 1 | 1 | +| tst.js:52:5:52:9 | 1_000 | 1 | +| tst.js:53:5:53:13 | 1_000_123 | 1 | +#select | tst2.ts:1:13:1:21 | 1 | | tst2.ts:1:21:1:21 | 1 | | tst.js:1:1:1:3 | "a" | @@ -61,3 +91,7 @@ | tst.js:48:1:48:7 | x.p = 1 | | tst.js:48:7:48:7 | 1 | | tst.js:49:6:49:6 | 1 | +| tst.js:52:1:52:9 | x = 1_000 | +| tst.js:52:5:52:9 | 1_000 | +| tst.js:53:1:53:13 | x = 1_000_123 | +| tst.js:53:5:53:13 | 1_000_123 | diff --git a/javascript/ql/test/library-tests/Constants/Constants.ql b/javascript/ql/test/library-tests/Constants/Constants.ql index dcd49275a86..903fe90bc91 100644 --- a/javascript/ql/test/library-tests/Constants/Constants.ql +++ b/javascript/ql/test/library-tests/Constants/Constants.ql @@ -2,3 +2,5 @@ import javascript from ConstantExpr c select c + +query int getIntValue(Expr e) { result = e.getIntValue() } diff --git a/javascript/ql/test/library-tests/Constants/tst.js b/javascript/ql/test/library-tests/Constants/tst.js index 0a24e13abc1..9e6e80ffaeb 100644 --- a/javascript/ql/test/library-tests/Constants/tst.js +++ b/javascript/ql/test/library-tests/Constants/tst.js @@ -48,3 +48,6 @@ x = 1; x.p = 1; x += 1; x += x; + +x = 1_000; +x = 1_000_123;