mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
adds tests
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
///////////////////
|
||||
// //
|
||||
// SHOULD FIND //
|
||||
// //
|
||||
///////////////////
|
||||
|
||||
foo[bar]
|
||||
foo.bar
|
||||
new Foo
|
||||
new Foo()
|
||||
foo.bar = 5
|
||||
foo(bar)
|
||||
x + y
|
||||
x - y
|
||||
x * y
|
||||
x / y
|
||||
x % y
|
||||
+x
|
||||
-x
|
||||
++x
|
||||
x++
|
||||
--x
|
||||
x--
|
||||
x += y
|
||||
x -= y
|
||||
x *= y
|
||||
x /= y
|
||||
x %= y
|
||||
x , y = p
|
||||
[1,2,...xs]
|
||||
x & y
|
||||
x | y
|
||||
x ^ y
|
||||
x << y
|
||||
x >> y
|
||||
x <<< y
|
||||
~x
|
||||
x &= y
|
||||
x |= y
|
||||
x ^= y
|
||||
x <<= y
|
||||
x >>= y
|
||||
x >>>= y
|
||||
for (let x of y) { }
|
||||
|
||||
|
||||
|
||||
///////////////////////
|
||||
// //
|
||||
// SHOULD NOT FIND //
|
||||
// //
|
||||
///////////////////////
|
||||
|
||||
x && y
|
||||
x || y
|
||||
!x
|
||||
if (x) { }
|
||||
while (x) { }
|
||||
for (; y; z) { }
|
||||
for (let x in y) { }
|
||||
@@ -0,0 +1,3 @@
|
||||
import javascript
|
||||
|
||||
query predicate test_inNullSensitiveContext(Expr e) { e.inNullSensitiveContext() }
|
||||
Reference in New Issue
Block a user