mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
add test for awaited
This commit is contained in:
@@ -38,6 +38,7 @@ isSource
|
||||
| test.py:24:38:24:42 | ControlFlowNode for three | test-source |
|
||||
| test.py:24:45:24:48 | ControlFlowNode for four | test-source |
|
||||
| test.py:25:34:25:39 | ControlFlowNode for second | test-source |
|
||||
| test.py:39:11:39:20 | ControlFlowNode for Await | test-source |
|
||||
syntaxErrors
|
||||
| Member[foo |
|
||||
| Member[foo] .Member[bar] |
|
||||
|
||||
@@ -30,4 +30,10 @@ CallFilter.arityOne(one, two) # NO match
|
||||
CallFilter.arityOne(one) # Match
|
||||
CallFilter.twoOrMore(one) # NO match
|
||||
CallFilter.twoOrMore(one, two) # Match
|
||||
CallFilter.twoOrMore(one, two, three) # Match
|
||||
CallFilter.twoOrMore(one, two, three) # Match
|
||||
|
||||
from testlib import CommonTokens
|
||||
|
||||
async def async_func():
|
||||
prom = CommonTokens.makePromise(1);
|
||||
val = await prom
|
||||
@@ -53,12 +53,13 @@ class Sinks extends ModelInput::SinkModelCsv {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Named parameters?
|
||||
// TODO: Commonly used tokens
|
||||
// TODO: Uniform tokens for fields
|
||||
// TODO: Non-positional arguments
|
||||
// TODO: Non-positional arguments (including Named parameters)
|
||||
// TODO: Any argument
|
||||
// TODO: Test taint steps.
|
||||
// TODO: Should `instance()` be shorthand for `subClass*().getReturn()`?
|
||||
// TODO: // There are no API-graph edges for: ArrayElement, Element, MapKey, MapValue (remove from valid tokens list)
|
||||
class Sources extends ModelInput::SourceModelCsv {
|
||||
// package;type;path;kind
|
||||
override predicate row(string row) {
|
||||
@@ -70,6 +71,8 @@ class Sources extends ModelInput::SourceModelCsv {
|
||||
"testlib;;Member[Callbacks].Member[first].Argument[0].Parameter[0];test-source", //
|
||||
"testlib;;Member[Callbacks].Member[param1to3].Argument[0].Parameter[1..3];test-source", //
|
||||
"testlib;;Member[Callbacks].Member[nonFirst].Argument[0].Parameter[1..];test-source", //
|
||||
// Common tokens.
|
||||
"testlib;;Member[CommonTokens].Member[makePromise].ReturnValue.Awaited;test-source", //
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user