mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
Java: Rewrite inline expectation tests to use parameterized module
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user