summaryrefslogtreecommitdiffstats
path: root/llvm/test/FileCheck/numeric-defines.txt
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/FileCheck/numeric-defines.txt')
-rw-r--r--llvm/test/FileCheck/numeric-defines.txt48
1 files changed, 32 insertions, 16 deletions
diff --git a/llvm/test/FileCheck/numeric-defines.txt b/llvm/test/FileCheck/numeric-defines.txt
index bbdd8e8c69e..2ace5bad3f2 100644
--- a/llvm/test/FileCheck/numeric-defines.txt
+++ b/llvm/test/FileCheck/numeric-defines.txt
@@ -1,22 +1,38 @@
; Test functionality of -D# option: numeric variables are defined to the right
; value and CHECK directives using them match as expected given the value set.
-RUN: FileCheck -D#NUMVAL=12 --check-prefix CHECKNUM --input-file %s %s
-RUN: not FileCheck -D#NUMVAL=8 --check-prefix CHECKNUM --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRMSG
-RUN: not FileCheck -D#NUMVAL=12 --check-prefix NUMNOT --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix NOT-NUMERRMSG
-RUN: FileCheck -D#NUMVAL=8 --check-prefixes NUMNOT --input-file %s %s
+RUN: FileCheck -D#NUMVAL1=8 -D#NUMVAL2='NUMVAL1 + 4' -check-prefixes CHECKNUM1,CHECKNUM2 -input-file %s %s
+RUN: not FileCheck -D#NUMVAL1=7 -D#NUMVAL2=12 -check-prefix CHECKNUM1 -input-file %s %s 2>&1 \
+RUN: | FileCheck %s --strict-whitespace -check-prefix NUMERRMSG1
+RUN: not FileCheck -D#NUMVAL1=8 -D#NUMVAL2=8 -check-prefix CHECKNUM2 -input-file %s %s 2>&1 \
+RUN: | FileCheck %s --strict-whitespace -check-prefix NUMERRMSG2
+RUN: not FileCheck -D#NUMVAL1=8 -D#NUMVAL2=8 -check-prefix NUMNOT -input-file %s %s 2>&1 \
+RUN: | FileCheck %s --strict-whitespace -check-prefixes NOT-NUMERRMSG1
+RUN: not FileCheck -D#NUMVAL1=7 -D#NUMVAL2=12 -check-prefix NUMNOT -input-file %s %s 2>&1 \
+RUN: | FileCheck %s --strict-whitespace -check-prefixes NOT-NUMERRMSG2
+RUN: FileCheck -D#NUMVAL1=7 -D#NUMVAL2=8 -check-prefixes NUMNOT -input-file %s %s
-Numeric value = 12
-CHECKNUM: Numeric value = [[#NUMVAL]]
-NUMNOT-NOT: Numeric value = [[#NUMVAL]]
+Numeric value #1 = 8
+Numeric value #2 = 12
+CHECKNUM1: Numeric value #1 = [[#NUMVAL1]]
+CHECKNUM2: Numeric value #2 = [[#NUMVAL2]]
+NUMNOT-NOT: Numeric value #1 = [[#NUMVAL1]]
+NUMNOT-NOT: Numeric value #2 = [[#NUMVAL2]]
-NUMERRMSG: defines.txt:[[#@LINE-3]]:11: error: CHECKNUM: expected string not found in input
-NUMERRMSG: defines.txt:1:1: note: scanning from here
-NUMERRMSG: defines.txt:1:1: note: with "NUMVAL" equal to "8"
-NUMERRMSG: defines.txt:[[#@LINE-7]]:1: note: possible intended match here
+NUMERRMSG1: defines.txt:[[#@LINE-5]]:12: error: CHECKNUM1: expected string not found in input
+NUMERRMSG1: defines.txt:1:1: note: scanning from here
+NUMERRMSG1: defines.txt:1:1: note: with "NUMVAL1" equal to "7"
+NUMERRMSG1: defines.txt:[[#@LINE-10]]:1: note: possible intended match here
-NOT-NUMERRMSG: defines.txt:[[#@LINE-7]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
-NOT-NUMERRMSG: defines.txt:[[#@LINE-10]]:1: note: found here
-NOT-NUMERRMSG: defines.txt:[[#@LINE-11]]:1: note: with "NUMVAL" equal to "12"
+NUMERRMSG2: defines.txt:[[#@LINE-9]]:12: error: CHECKNUM2: expected string not found in input
+NUMERRMSG2: defines.txt:1:1: note: scanning from here
+NUMERRMSG2: defines.txt:1:1: note: with "NUMVAL2" equal to "8"
+NUMERRMSG2: defines.txt:[[#@LINE-14]]:1: note: possible intended match here
+
+NOT-NUMERRMSG1: defines.txt:[[#@LINE-13]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
+NOT-NUMERRMSG1: defines.txt:[[#@LINE-18]]:1: note: found here
+NOT-NUMERRMSG1: defines.txt:[[#@LINE-19]]:1: note: with "NUMVAL1" equal to "8"
+
+NOT-NUMERRMSG2: defines.txt:[[#@LINE-16]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
+NOT-NUMERRMSG2: defines.txt:[[#@LINE-21]]:1: note: found here
+NOT-NUMERRMSG2: defines.txt:[[#@LINE-22]]:1: note: with "NUMVAL2" equal to "12"
OpenPOWER on IntegriCloud