File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 11The files here use the LLVM FileCheck framework, documented at
22< https://llvm.org/docs/CommandGuide/FileCheck.html > .
3+
4+ One extension worth noting is the use of revisions as custom prefixes for
5+ FileCheck. If your codegen test has different behavior based on the chosen
6+ target or different compiler flags that you want to exercise, you can use a
7+ revisions annotation, like so:
8+
9+ ``` rust
10+ // revisions: aaa bbb
11+ // [bbb] compile-flags: --flags-for-bbb
12+ ```
13+
14+ After specifying those variations, you can write different expected, or
15+ explicitly * unexpected* output by using ` <prefix>-SAME: ` and ` <prefix>-NOT: ` ,
16+ like so:
17+
18+ ``` rust
19+ // CHECK: expected code
20+ // aaa-SAME: emitted-only-for-aaa
21+ // aaa-NOT: emitted-only-for-bbb
22+ // bbb-NOT: emitted-only-for-aaa
23+ // bbb-SAME: emitted-only-for-bbb
24+ ```
You can’t perform that action at this time.
0 commit comments