Skip to content

Commit b173b41

Browse files
authored
Merge pull request github#6096 from smowton/smowton/fix/inline-expectations-missing-prefix
Inline expectation tests: accept // $MISSING: and // $SPURIOUS:
2 parents 0febf5a + 558813a commit b173b41

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cpp/ql/test/TestUtilities/InlineExpectationsTest.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) {
181181
min(string name, int cand |
182182
exists(TNamedColumn(name)) and
183183
cand = content.indexOf(name + ":") and
184-
cand > start
184+
cand >= start
185185
|
186186
cand
187187
)
188188
or
189189
not exists(string name |
190190
exists(TNamedColumn(name)) and
191-
content.indexOf(name + ":") > start
191+
content.indexOf(name + ":") >= start
192192
) and
193193
result = content.length()
194194
}

java/ql/test/TestUtilities/InlineExpectationsTest.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) {
181181
min(string name, int cand |
182182
exists(TNamedColumn(name)) and
183183
cand = content.indexOf(name + ":") and
184-
cand > start
184+
cand >= start
185185
|
186186
cand
187187
)
188188
or
189189
not exists(string name |
190190
exists(TNamedColumn(name)) and
191-
content.indexOf(name + ":") > start
191+
content.indexOf(name + ":") >= start
192192
) and
193193
result = content.length()
194194
}

python/ql/test/TestUtilities/InlineExpectationsTest.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ private int getEndOfColumnPosition(int start, string content) {
181181
min(string name, int cand |
182182
exists(TNamedColumn(name)) and
183183
cand = content.indexOf(name + ":") and
184-
cand > start
184+
cand >= start
185185
|
186186
cand
187187
)
188188
or
189189
not exists(string name |
190190
exists(TNamedColumn(name)) and
191-
content.indexOf(name + ":") > start
191+
content.indexOf(name + ":") >= start
192192
) and
193193
result = content.length()
194194
}

0 commit comments

Comments
 (0)