diff options
| -rw-r--r-- | tests/codegen/meta-filecheck/check-prefix.rs | 4 | ||||
| -rw-r--r-- | tests/codegen/meta-filecheck/msvc-prefix-bad.rs | 7 | ||||
| -rw-r--r-- | tests/codegen/meta-filecheck/msvc-prefix-good.rs | 7 | ||||
| -rw-r--r-- | tests/codegen/meta-filecheck/no-directives.rs | 5 | ||||
| -rw-r--r-- | tests/codegen/meta-filecheck/revision-prefix.rs | 8 |
5 files changed, 31 insertions, 0 deletions
diff --git a/tests/codegen/meta-filecheck/check-prefix.rs b/tests/codegen/meta-filecheck/check-prefix.rs new file mode 100644 index 00000000000..98bec68627e --- /dev/null +++ b/tests/codegen/meta-filecheck/check-prefix.rs @@ -0,0 +1,4 @@ +// Simple test that uses the default CHECK prefix and should always succeed. + +// CHECK: main +fn main() {} diff --git a/tests/codegen/meta-filecheck/msvc-prefix-bad.rs b/tests/codegen/meta-filecheck/msvc-prefix-bad.rs new file mode 100644 index 00000000000..f9984c74e2a --- /dev/null +++ b/tests/codegen/meta-filecheck/msvc-prefix-bad.rs @@ -0,0 +1,7 @@ +// This is exactly like `msvc-prefix-good.rs`, except that it should always fail. + +//@ should-fail + +// MSVC: text that should not match +// NONMSVC: text that should not match +fn main() {} diff --git a/tests/codegen/meta-filecheck/msvc-prefix-good.rs b/tests/codegen/meta-filecheck/msvc-prefix-good.rs new file mode 100644 index 00000000000..580d20d5438 --- /dev/null +++ b/tests/codegen/meta-filecheck/msvc-prefix-good.rs @@ -0,0 +1,7 @@ +// One of MSVC or NONMSVC should always be defined, so this test should pass. + +// (one of these should always be present) + +// MSVC: main +// NONMSVC: main +fn main() {} diff --git a/tests/codegen/meta-filecheck/no-directives.rs b/tests/codegen/meta-filecheck/no-directives.rs new file mode 100644 index 00000000000..2cab263604e --- /dev/null +++ b/tests/codegen/meta-filecheck/no-directives.rs @@ -0,0 +1,5 @@ +// A test that doesn't include any filecheck directives should fail. + +//@ should-fail + +fn main() {} diff --git a/tests/codegen/meta-filecheck/revision-prefix.rs b/tests/codegen/meta-filecheck/revision-prefix.rs new file mode 100644 index 00000000000..431066e3acc --- /dev/null +++ b/tests/codegen/meta-filecheck/revision-prefix.rs @@ -0,0 +1,8 @@ +// The current revision name is registered as a filecheck prefix. + +//@ revisions: GOOD BAD +//@ [BAD] should-fail + +// GOOD: main +// BAD: text that should not match +fn main() {} |
