4343 * There is no need to write a `select` clause or query predicate. All of the differences between
4444 * expected results and actual results will be reported in the `failures()` query predicate.
4545 *
46- * To annotate the test source code with an expected result, place a comment on the
46+ * To annotate the test source code with an expected result, place a comment starting with a `$` on the
4747 * same line as the expected result, with text of the following format as the body of the comment:
4848 *
49- * `$ tag=expected-value`
49+ * `tag=expected-value`
5050 *
5151 * Where `tag` is the value of the `tag` parameter from `hasActualResult()`, and `expected-value` is
5252 * the value of the `value` parameter from `hasActualResult()`. The `=expected-value` portion may be
5353 * omitted, in which case `expected-value` is treated as the empty string. Multiple expectations may
54- * be placed in the same comment, as long as each is prefixed by a `$` . Any actual result that
54+ * be placed in the same comment. Any actual result that
5555 * appears on a line that does not contain a matching expected result comment will be reported with
5656 * a message of the form "Unexpected result: tag=value". Any expected result comment for which there
5757 * is no matching actual result will be reported with a message of the form
6060 * Example:
6161 * ```cpp
6262 * int i = x + 5; // $const=5
63- * int j = y + (7 - 3) // $const=7 $ const=3 $ const=4 // The result of the subtraction is a constant.
63+ * int j = y + (7 - 3) // $const=7 const=3 const=4 // The result of the subtraction is a constant.
6464 * ```
6565 *
66- * For tests that contain known false positives and false negatives , it is possible to further
67- * annotate that a particular expected result is known to be a false positive , or that a particular
68- * missing result is known to be a false negative :
66+ * For tests that contain known missing and spurious results , it is possible to further
67+ * annotate that a particular expected result is known to be spurious , or that a particular
68+ * missing result is known to be missing :
6969 *
70- * `$f+: tag=expected-value` // False positive
71- * `$f-: tag=expected-value` // False negative
70+ * `$ SPURIOUS: tag=expected-value` // Spurious result
71+ * `$ MISSING: tag=expected-value` // Missing result
7272 *
73- * A false positive expectation is treated as any other expected result, except that if there is no
74- * matching actual result, the message will be of the form "Fixed false positive : tag=value". A
75- * false negative expectation is treated as if there were no expected result, except that if a
73+ * A spurious expectation is treated as any other expected result, except that if there is no
74+ * matching actual result, the message will be of the form "Fixed spurious result : tag=value". A
75+ * missing expectation is treated as if there were no expected result, except that if a
7676 * matching expected result is found, the message will be of the form
77- * "Fixed false negative: tag=value".
77+ * "Fixed missing result: tag=value".
78+ *
79+ * A single line can contain all the expected, spurious and missing results of that line. For instance:
80+ * `$ tag1=value1 SPURIOUS: tag2=value2 MISSING: tag3=value3`.
7881 *
7982 * If the same result value is expected for two or more tags on the same line, there is a shorthand
8083 * notation available:
8184 *
82- * `$ tag1,tag2=expected-value`
85+ * `tag1,tag2=expected-value`
8386 *
8487 * is equivalent to:
8588 *
86- * `$ tag1=expected-value $ tag2=expected-value`
89+ * `tag1=expected-value tag2=expected-value`
8790 */
8891
8992private import InlineExpectationsTestPrivate
@@ -126,7 +129,7 @@ abstract class InlineExpectationsTest extends string {
126129 (
127130 exists ( FalseNegativeExpectation falseNegative |
128131 falseNegative .matchesActualResult ( actualResult ) and
129- message = "Fixed false negative :" + falseNegative .getExpectationText ( )
132+ message = "Fixed missing result :" + falseNegative .getExpectationText ( )
130133 )
131134 or
132135 not exists ( ValidExpectation expectation | expectation .matchesActualResult ( actualResult ) ) and
@@ -143,7 +146,7 @@ abstract class InlineExpectationsTest extends string {
143146 message = "Missing result:" + expectation .getExpectationText ( )
144147 or
145148 expectation instanceof FalsePositiveExpectation and
146- message = "Fixed false positive :" + expectation .getExpectationText ( )
149+ message = "Fixed spurious result :" + expectation .getExpectationText ( )
147150 )
148151 )
149152 or
0 commit comments