add failingPositiveTests to inlinetests

This commit is contained in:
amammad
2023-11-22 08:00:38 +01:00
parent 0328a2986d
commit eb552b7c93
2 changed files with 9 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
passingPositiveTests
| PASSED | SQLInjectionPoint | test.ts:19:54:19:79 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:20:55:20:80 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:82:70:82:95 | // test ... onPoint |
@@ -28,3 +29,4 @@
| PASSED | SQLInjectionPoint | test.ts:210:28:210:53 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:213:56:213:81 | // test ... onPoint |
| PASSED | SQLInjectionPoint | test.ts:217:56:217:81 | // test ... onPoint |
failingPositiveTests

View File

@@ -25,3 +25,10 @@ query predicate passingPositiveTests(string res, string expectation, InlineTest
expectation = "SQLInjectionPoint" and
exists(SQL::SqlString n | t.inNode(n))
}
query predicate failingPositiveTests(string res, string expectation, InlineTest t) {
res = "FAILED" and
t.hasPositiveTest(expectation) and
expectation = "SQLInjectionPoint" and
not exists(SQL::SqlString n | t.inNode(n))
}