aggregate the tests in library-tests/TypeScript/BigInts into a single .ql file

This commit is contained in:
Erik Krogh Kristensen
2020-10-14 14:16:49 +02:00
parent a588f438b6
commit 7817ee7611
14 changed files with 32 additions and 37 deletions

View File

@@ -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 |

View File

@@ -1,4 +0,0 @@
import javascript
from BigIntLiteral literal
select literal, literal.getFloatValue()

View File

@@ -1 +0,0 @@
| tst.ts:1:25:1:28 | 100n | 100 |

View File

@@ -1,4 +0,0 @@
import javascript
from BigIntLiteral literal
select literal, literal.getIntValue()

View File

@@ -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 |

View File

@@ -1,5 +0,0 @@
import javascript
from Expr e
where e.getType() instanceof BigIntType
select e

View File

@@ -1 +0,0 @@
| tst.ts:6:24:6:28 | 1000n | 1000 |

View File

@@ -1,4 +0,0 @@
import javascript
from BigIntLiteralTypeExpr type
select type, type.getIntValue()

View File

@@ -1 +0,0 @@
| tst.ts:5:24:5:29 | bigint |

View File

@@ -1,5 +0,0 @@
import javascript
from TypeExpr type
where type.isBigInt()
select type

View File

@@ -1,4 +0,0 @@
import javascript
from BigIntLiteralType type
select type, type.getIntValue()

View File

@@ -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 |

View 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 }