Shared: Add missing spaces in inline test expectation output

This commit is contained in:
Tom Hvitved
2024-10-25 12:14:37 +02:00
parent 55d092fd3e
commit 7c4d5981dd
9 changed files with 91 additions and 85 deletions

View File

@@ -177,7 +177,7 @@ module Make<InlineExpectationsTestSig Impl> {
(
exists(FalseNegativeTestExpectation falseNegative |
falseNegative.matchesActualResult(actualResult) and
message = "Fixed missing result:" + falseNegative.getExpectationText()
message = "Fixed missing result: " + falseNegative.getExpectationText()
)
or
not exists(ValidTestExpectation expectation |
@@ -202,10 +202,10 @@ module Make<InlineExpectationsTestSig Impl> {
element = expectation and
(
expectation instanceof GoodTestExpectation and
message = "Missing result:" + expectation.getExpectationText()
message = "Missing result: " + expectation.getExpectationText()
or
expectation instanceof FalsePositiveTestExpectation and
message = "Fixed spurious result:" + expectation.getExpectationText()
message = "Fixed spurious result: " + expectation.getExpectationText()
)
)
or
@@ -242,7 +242,13 @@ module Make<InlineExpectationsTestSig Impl> {
Impl::Location getLocation() { none() }
final string getExpectationText() { result = this.getTag() + "=" + this.getValue() }
final string getExpectationText() {
exists(string suffix |
if this.getValue() = "" then suffix = "" else suffix = "=" + this.getValue()
|
result = this.getTag() + suffix
)
}
string getTag() { none() }