We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 790b19f + 6ae1c03 commit e8d8599Copy full SHA for e8d8599
src/test/mir-opt/README.md
@@ -14,6 +14,18 @@ presence of pointers in constants or other bit width dependent things. In that c
14
15
to your test, causing separate files to be generated for 32bit and 64bit systems.
16
17
+## Unit testing
18
+
19
+If you are only testing the behavior of a particular mir-opt pass on some specific input (as is
20
+usually the case), you should add
21
22
+```
23
+// unit-test: PassName
24
25
26
+to the top of the file. This makes sure that other passes don't run which means you'll get the input
27
+you expected and your test won't break when other code changes.
28
29
## Emit a diff of the mir for a specific optimization
30
31
This is what you want most often when you want to see how an optimization changes the MIR.
0 commit comments