Skip to content

Commit d14b2c2

Browse files
committed
C++: Put quotes around expectation comments with spaces.
1 parent c4c7c95 commit d14b2c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/ql/test/library-tests/ir/range-analysis/RangeAnalysis.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class RangeAnalysisTest extends InlineExpectationsTest {
1717
tag = "range" and
1818
element = e.toString() and
1919
location = e.getLocation() and
20-
value = getARangeString(e)
20+
value = quote(getARangeString(e))
2121
)
2222
}
2323
}
@@ -33,6 +33,9 @@ private string getOffsetString(int value) {
3333
if value >= 0 then result = "+" + value.toString() else result = value.toString()
3434
}
3535

36+
bindingset[s]
37+
string quote(string s) { if s.matches("% %") then result = "\"" + s + "\"" else result = s }
38+
3639
bindingset[delta]
3740
private string getBoundString(SemBound b, int delta) {
3841
b instanceof SemZeroBound and result = delta.toString()

0 commit comments

Comments
 (0)