]> git.lizzy.rs Git - rust.git/blobdiff - COMPILER_TESTS.md
Fix UB in test helpers
[rust.git] / COMPILER_TESTS.md
index 08afd2137ba0cf0228a5fcda07f8336ac00925bc..58df1aae6d3f099815f5751b009e15745440d656 100644 (file)
@@ -42,6 +42,13 @@ whole, instead of just a few lines inside the test.
 * `ignore-test` always ignores the test
 * `ignore-lldb` and `ignore-gdb` will skip the debuginfo tests
 * `min-{gdb,lldb}-version`
+* `should-fail` indicates that the test should fail; used for "meta testing",
+  where we test the compiletest program itself to check that it will generate
+  errors in appropriate scenarios. This header is ignored for pretty-printer tests.
+* `gate-test-X` where `X` is a feature marks the test as "gate test" for feature X.
+  Such tests are supposed to ensure that the compiler errors when usage of a gated
+  feature is attempted without the proper `#![feature(X)]` tag.
+  Each unstable lang feature is required to have a gate test.
 
 ## Revisions
 
@@ -73,3 +80,9 @@ fn test_foo() {
     let x: usize = 32_u32; //[foo]~ ERROR mismatched types
 }
 ```
+
+Note that not all headers have meaning when customized to a revision.
+For example, the `ignore-test` header (and all "ignore" headers)
+currently only apply to the test as a whole, not to particular
+revisions. The only headers that are intended to really work when
+customized to a revision are error patterns and compiler flags.