-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3760 from d10c/d10c/bigint-quick-eval-fix
Add a version-check to BigInt quick-eval test
- Loading branch information
Showing
4 changed files
with
67 additions
and
28 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
extensions/ql-vscode/test/data/debugger/QuickEvalBigIntQuery.ql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import QuickEvalLib | ||
|
||
class InterestingBigInt instanceof InterestingNumber | ||
{ | ||
QlBuiltins::BigInt getBigIntValue() { | ||
result = super.getValue().toBigInt().pow(10) | ||
} | ||
|
||
string toString() { | ||
result = super.toString() | ||
} | ||
} | ||
|
||
class PrimeNumber extends InterestingNumber { | ||
PrimeNumber() { | ||
exists(int n | this = MkNumber(n) | | ||
n in [ | ||
2, | ||
3, | ||
5, | ||
7, | ||
11, | ||
13, | ||
17, | ||
19 | ||
]) | ||
} | ||
} | ||
|
||
from InterestingNumber n | ||
select n.toString() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters