mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
JS: Add test for WithArity
This commit is contained in:
@@ -27,6 +27,7 @@ taintFlow
|
||||
| test.js:75:28:75:35 | source() | test.js:75:28:75:35 | source() |
|
||||
| test.js:76:31:76:38 | source() | test.js:76:31:76:38 | source() |
|
||||
| test.js:77:34:77:41 | source() | test.js:77:34:77:41 | source() |
|
||||
| test.js:81:28:81:35 | source() | test.js:81:28:81:35 | source() |
|
||||
isSink
|
||||
| test.js:46:18:46:25 | source() | test-sink |
|
||||
| test.js:47:22:47:29 | source() | test-sink |
|
||||
@@ -68,3 +69,5 @@ isSink
|
||||
| test.js:78:28:78:28 | 1 | test-sink |
|
||||
| test.js:78:31:78:31 | 2 | test-sink |
|
||||
| test.js:78:34:78:34 | 3 | test-sink |
|
||||
| test.js:81:28:81:35 | source() | test-sink |
|
||||
| test.js:82:28:82:28 | 1 | test-sink |
|
||||
|
||||
@@ -76,4 +76,11 @@ function testSinks() {
|
||||
testlib.mySinkExceptLast(1, source(), 3, 4); // NOT OK
|
||||
testlib.mySinkExceptLast(1, 2, source(), 4); // NOT OK
|
||||
testlib.mySinkExceptLast(1, 2, 3, source()); // OK
|
||||
|
||||
testlib.mySinkIfArityTwo(source()); // OK
|
||||
testlib.mySinkIfArityTwo(source(), 2); // NOT OK
|
||||
testlib.mySinkIfArityTwo(1, source()); // OK
|
||||
testlib.mySinkIfArityTwo(source(), 2, 3); // OK
|
||||
testlib.mySinkIfArityTwo(1, source(), 3); // OK
|
||||
testlib.mySinkIfArityTwo(1, 2, source()); // OK
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ class Sinks extends ModelInput::SinkModelCsv {
|
||||
"testlib;;Member[mySinkTwoLast].Argument[N-1,N-2];test-sink",
|
||||
"testlib;;Member[mySinkTwoLastRange].Argument[N-2..N-1];test-sink",
|
||||
"testlib;;Member[mySinkExceptLast].Argument[0..N-2];test-sink",
|
||||
"testlib;;Member[mySinkIfArityTwo].WithArity[2].Argument[0];test-sink",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user