aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/AsmParser/directive-err.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/AsmParser/directive-err.s')
-rw-r--r--test/MC/AsmParser/directive-err.s30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/MC/AsmParser/directive-err.s b/test/MC/AsmParser/directive-err.s
new file mode 100644
index 0000000..63b8939
--- /dev/null
+++ b/test/MC/AsmParser/directive-err.s
@@ -0,0 +1,30 @@
+// RUN: not llvm-mc -triple i386 %s 2>&1 | FileCheck %s
+
+ .err
+// CHECK: error: .err encountered
+// CHECK-NEXT: .err
+// CHECK-NEXT: ^
+
+ .ifc a,a
+ .err
+ .endif
+// CHECK: error: .err encountered
+// CHECK-NEXT: .err
+// CHECK-NEXT: ^
+
+ .ifnc a,a
+ .err
+ .endif
+// CHECK-NOT: error: .err encountered
+
+ .error "This is my error. There are many like it, but this one is mine."
+// CHECK: error: This is my error. There are many like it, but this one is mine.
+
+ .ifc one, two
+ .error "My error is my best friend."
+ .endif
+// CHECK-NOT: error: My error is my best friend.
+
+ .error
+// CHECK: error: .error directive invoked in source file
+