diff options
Diffstat (limited to 'tests/codegen-llvm/meta-filecheck')
5 files changed, 32 insertions, 0 deletions
diff --git a/tests/codegen-llvm/meta-filecheck/check-prefix.rs b/tests/codegen-llvm/meta-filecheck/check-prefix.rs new file mode 100644 index 00000000000..98bec68627e --- /dev/null +++ b/tests/codegen-llvm/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-llvm/meta-filecheck/filecheck-flags.rs b/tests/codegen-llvm/meta-filecheck/filecheck-flags.rs new file mode 100644 index 00000000000..8e451cf4fdc --- /dev/null +++ b/tests/codegen-llvm/meta-filecheck/filecheck-flags.rs @@ -0,0 +1,8 @@ +// Arguments provided via `filecheck-flags` should be passed to `filecheck`. + +//@ revisions: good bad +//@ [good] filecheck-flags: --check-prefix=CUSTOM +//@ [bad] should-fail + +// CUSTOM: main +fn main() {} diff --git a/tests/codegen-llvm/meta-filecheck/msvc-prefix-bad.rs b/tests/codegen-llvm/meta-filecheck/msvc-prefix-bad.rs new file mode 100644 index 00000000000..f9984c74e2a --- /dev/null +++ b/tests/codegen-llvm/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-llvm/meta-filecheck/no-directives.rs b/tests/codegen-llvm/meta-filecheck/no-directives.rs new file mode 100644 index 00000000000..2cab263604e --- /dev/null +++ b/tests/codegen-llvm/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-llvm/meta-filecheck/revision-prefix.rs b/tests/codegen-llvm/meta-filecheck/revision-prefix.rs new file mode 100644 index 00000000000..431066e3acc --- /dev/null +++ b/tests/codegen-llvm/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() {} |
