Java: Rewrite inline expectation tests to use parameterized module

This commit is contained in:
Jeroen Ketema
2023-06-05 16:54:08 +02:00
parent 97c4f497bc
commit 49993b023e
132 changed files with 466 additions and 336 deletions

View File

@@ -2,12 +2,10 @@ import java
import semmle.code.java.security.SensitiveKeyboardCacheQuery
import TestUtilities.InlineExpectationsTest
class SensitiveKeyboardCacheTest extends InlineExpectationsTest {
SensitiveKeyboardCacheTest() { this = "SensitiveKeyboardCacheTest" }
module SensitiveKeyboardCacheTest implements TestSig {
string getARelevantTag() { result = "hasResult" }
override string getARelevantTag() { result = "hasResult" }
override predicate hasActualResult(Location loc, string element, string tag, string value) {
predicate hasActualResult(Location loc, string element, string tag, string value) {
exists(AndroidEditableXmlElement el |
el = getASensitiveCachedInput() and
loc = el.getLocation() and
@@ -17,3 +15,5 @@ class SensitiveKeyboardCacheTest extends InlineExpectationsTest {
)
}
}
import MakeTest<SensitiveKeyboardCacheTest>