From 62cb90e8c6c004dcbb124a3c1a7ad860ee45b92f Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 17 Feb 2014 00:40:22 +0000 Subject: [PATCH] MCAsmParser: add some mixed argument tests Add some tests to explicitly validate handling of comma and non-comma separated arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201500 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/AsmParser/macros-argument-parsing.s | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/MC/AsmParser/macros-argument-parsing.s b/test/MC/AsmParser/macros-argument-parsing.s index 11da298e00e..39242cf1736 100644 --- a/test/MC/AsmParser/macros-argument-parsing.s +++ b/test/MC/AsmParser/macros-argument-parsing.s @@ -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 + -- 2.34.1