forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ql
More file actions
24 lines (21 loc) · 634 Bytes
/
Copy pathtest.ql
File metadata and controls
24 lines (21 loc) · 634 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import python
import Functions.MethodArgNames
import utils.test.InlineExpectationsTest
module MethodArgTest implements TestSig {
string getARelevantTag() { result = ["shouldBeSelf", "shouldBeCls"] }
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(Function f |
element = f.toString() and
location = f.getLocation() and
value = "" and
(
firstArgShouldBeNamedSelfAndIsnt(f) and
tag = "shouldBeSelf"
or
firstArgShouldReferToClsAndDoesnt(f) and
tag = "shouldBeCls"
)
)
}
}
import MakeTest<MethodArgTest>