mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
aggregate the tests in library-tests/TypeScript/BigInts into a single .ql file
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
| tst.ts:1:25:1:28 | 100n | 100.0 |
|
||||
| tst.ts:2:25:2:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
| tst.ts:3:25:3:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteral literal
|
||||
select literal, literal.getFloatValue()
|
||||
@@ -1 +0,0 @@
|
||||
| tst.ts:1:25:1:28 | 100n | 100 |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteral literal
|
||||
select literal, literal.getIntValue()
|
||||
@@ -1,4 +0,0 @@
|
||||
| tst.ts:1:5:1:11 | hundred |
|
||||
| tst.ts:2:5:2:12 | bigValue |
|
||||
| tst.ts:3:5:3:20 | bigNegativeValue |
|
||||
| tst.ts:5:5:5:14 | bigintType |
|
||||
@@ -1,5 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from Expr e
|
||||
where e.getType() instanceof BigIntType
|
||||
select e
|
||||
@@ -1 +0,0 @@
|
||||
| tst.ts:6:24:6:28 | 1000n | 1000 |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteralTypeExpr type
|
||||
select type, type.getIntValue()
|
||||
@@ -1 +0,0 @@
|
||||
| tst.ts:5:24:5:29 | bigint |
|
||||
@@ -1,5 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from TypeExpr type
|
||||
where type.isBigInt()
|
||||
select type
|
||||
@@ -1 +0,0 @@
|
||||
| 1000n | 1000 |
|
||||
@@ -1,4 +0,0 @@
|
||||
import javascript
|
||||
|
||||
from BigIntLiteralType type
|
||||
select type, type.getIntValue()
|
||||
@@ -0,0 +1,17 @@
|
||||
exprFloatValue
|
||||
| tst.ts:1:25:1:28 | 100n | 100.0 |
|
||||
| tst.ts:2:25:2:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
| tst.ts:3:25:3:56 | 1000000 ... 000000n | 1.0E30 |
|
||||
exprIntValue
|
||||
| tst.ts:1:25:1:28 | 100n | 100 |
|
||||
exprWithBigIntType
|
||||
| tst.ts:1:5:1:11 | hundred |
|
||||
| tst.ts:2:5:2:12 | bigValue |
|
||||
| tst.ts:3:5:3:20 | bigNegativeValue |
|
||||
| tst.ts:5:5:5:14 | bigintType |
|
||||
literalTypeExprIntValue
|
||||
| tst.ts:6:24:6:28 | 1000n | 1000 |
|
||||
typeExpr
|
||||
| tst.ts:5:24:5:29 | bigint |
|
||||
typeIntValue
|
||||
| 1000n | 1000 |
|
||||
15
javascript/ql/test/library-tests/TypeScript/BigInts/tests.ql
Normal file
15
javascript/ql/test/library-tests/TypeScript/BigInts/tests.ql
Normal file
@@ -0,0 +1,15 @@
|
||||
import javascript
|
||||
|
||||
query predicate exprFloatValue(BigIntLiteral literal, float f) { f = literal.getFloatValue() }
|
||||
|
||||
query predicate exprIntValue(BigIntLiteral literal, int i) { i = literal.getIntValue() }
|
||||
|
||||
query predicate exprWithBigIntType(Expr e) { e.getType() instanceof BigIntType }
|
||||
|
||||
query predicate literalTypeExprIntValue(BigIntLiteralTypeExpr type, int val) {
|
||||
val = type.getIntValue()
|
||||
}
|
||||
|
||||
query predicate typeExpr(TypeExpr type) { type.isBigInt() }
|
||||
|
||||
query predicate typeIntValue(BigIntLiteralType type, int i) { type.getIntValue() = i }
|
||||
Reference in New Issue
Block a user