[llvm] r201500 - MCAsmParser: add some mixed argument tests

Saleem Abdulrasool compnerd at compnerd.org
Sun Feb 16 16:40:22 PST 2014


Author: compnerd
Date: Sun Feb 16 18:40:22 2014
New Revision: 201500

URL: http://llvm.org/viewvc/llvm-project?rev=201500&view=rev
Log:
MCAsmParser: add some mixed argument tests

Add some tests to explicitly validate handling of comma and non-comma separated
arguments.

Modified:
    llvm/trunk/test/MC/AsmParser/macros-argument-parsing.s

Modified: llvm/trunk/test/MC/AsmParser/macros-argument-parsing.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/macros-argument-parsing.s?rev=201500&r1=201499&r2=201500&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/macros-argument-parsing.s (original)
+++ llvm/trunk/test/MC/AsmParser/macros-argument-parsing.s Sun Feb 16 18:40:22 2014
@@ -59,3 +59,33 @@
 # CHECK: .long second
 # CHECK: .long -1
 
+	.macro mixed arg0 = 0, arg1 = 1 arg2 = 2, arg3 = 3
+		# begin entry
+		.long \arg0
+		.long \arg1
+		.long \arg2
+		.long \arg3
+		# end entry
+	.endm
+
+mixed 1, 2 3
+
+# CHECK: .long 1
+# CHECK: .long 2
+# CHECK: .long 3
+# CHECK: .long 3
+
+mixed 1 2, 3
+
+# CHECK: .long 1
+# CHECK: .long 2
+# CHECK: .long 3
+# CHECK: .long 3
+
+mixed 1 2, 3 4
+
+# CHECK: .long 1
+# CHECK: .long 2
+# CHECK: .long 3
+# CHECK: .long 4
+





More information about the llvm-commits mailing list