JavaScript: Consolidate tutorial tests.

This commit is contained in:
Max Schaefer
2019-03-04 09:19:31 +00:00
parent 5a242d4849
commit 256f3b013b
60 changed files with 232 additions and 156 deletions

View File

@@ -0,0 +1,18 @@
import javascript
query predicate test_query7(
DeclStmt ds, string res0, VariableDeclarator d1, string res1, VariableDeclarator d2, string res2
) {
exists(Variable v, int i, int j |
d1 = ds.getDecl(i) and
d2 = ds.getDecl(j) and
i < j and
v = d1.getBindingPattern().getAVariable() and
v = d2.getBindingPattern().getAVariable() and
not ds.getTopLevel().isMinified()
|
res0 = "Variable " + v.getName() + " is declared both $@ and $@." and
res1 = "here" and
res2 = "here"
)
}