mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
dce7717f79
Summary: Testing of caret location in diagnostic message is currently made with CHECK directive with the following general format: CHECK: {{^ \^$}} James Henderson suggested the following would be more readable: CHECK: {{^}} ^{{$}} and when whole lines can be matched (as is the case for command-line testing where error messages do not include path): CHECK: ^ using the option --match-full-lines. This commit implements these 2 changes on all existing caret position tests. It also aligns the caret to the character it is trying to match in the above line. Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya Tags: #llvm Differential Revision: https://reviews.llvm.org/D64923 > llvm-svn: 366861 llvm-svn: 366898
146 lines
4.8 KiB
Plaintext
146 lines
4.8 KiB
Plaintext
; RUN: FileCheck -input-file %s %s 2>&1 | FileCheck -check-prefix QUIET --allow-empty %s
|
|
; RUN: FileCheck -v -input-file %s %s 2>&1 | FileCheck --strict-whitespace -check-prefix V %s
|
|
; RUN: FileCheck -vv -input-file %s %s 2>&1 | FileCheck --strict-whitespace -check-prefixes V,VV %s
|
|
|
|
foo
|
|
bar
|
|
CHECK: foo
|
|
CHECK-NOT: raboof
|
|
CHECK-NEXT: bar
|
|
|
|
V: verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
|
|
V-NEXT: {{C}}HECK: foo{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-9]]:1: note: found here
|
|
V-NEXT: {{^}}foo{{$}}
|
|
V-NEXT: {{^}}^~~{{$}}
|
|
|
|
V-NEXT: verbose.txt:[[@LINE-9]]:13: remark: {{C}}HECK-NEXT: expected string found in input
|
|
V-NEXT: {{C}}HECK-NEXT: bar{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-15]]:1: note: found here
|
|
V-NEXT: {{^}}bar{{$}}
|
|
V-NEXT: {{^}}^~~{{$}}
|
|
|
|
VV-NEXT: verbose.txt:[[@LINE-17]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
|
|
VV-NEXT: {{C}}HECK-NOT: raboof{{$}}
|
|
VV-NEXT: {{^}} ^{{$}}
|
|
VV-NEXT: verbose.txt:[[@LINE-22]]:1: note: scanning from here
|
|
VV-NEXT: {{^}}bar{{$}}
|
|
VV-NEXT: {{^}}^{{$}}
|
|
|
|
NUMVAR=42
|
|
NUMVAR - 1:41
|
|
CHECK: NUMVAR=[[#NUMVAR:]]
|
|
CHECK-NOT: [[#NUMVAR + 1]]
|
|
CHECK-NEXT: NUMVAR - 1:[[#NUMVAR - 1]]
|
|
|
|
V: verbose.txt:[[#@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
|
|
V-NEXT: {{C}}HECK: {{NUMVAR=[[][[]#NUMVAR:[]][]]$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[#@LINE-9]]:1: note: found here
|
|
V-NEXT: {{^}}NUMVAR=42{{$}}
|
|
V-NEXT: {{^}}^~~~~~~~~{{$}}
|
|
|
|
V-NEXT: verbose.txt:[[#@LINE-9]]:13: remark: {{C}}HECK-NEXT: expected string found in input
|
|
V-NEXT: {{C}}HECK-NEXT: {{NUMVAR - 1:[[][[]#NUMVAR - 1[]][]]$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[#@LINE-15]]:1: note: found here
|
|
V-NEXT: {{^}}NUMVAR - 1:41{{$}}
|
|
V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
|
|
V-NEXT: verbose.txt:[[#@LINE-18]]:1: note: with "NUMVAR - 1" equal to "41"
|
|
V-NEXT: {{^}}NUMVAR - 1:41{{$}}
|
|
V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
|
|
|
|
VV-NEXT: verbose.txt:[[#@LINE-20]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
|
|
VV-NEXT: {{C}}HECK-NOT: {{[[][[]#NUMVAR [+] 1[]][]]$}}
|
|
VV-NEXT: {{^}} ^{{$}}
|
|
VV-NEXT: verbose.txt:[[#@LINE-25]]:1: note: scanning from here
|
|
VV-NEXT: {{^}}NUMVAR - 1:41{{$}}
|
|
VV-NEXT: {{^}}^{{$}}
|
|
|
|
before empty
|
|
|
|
after empty
|
|
CHECK: before empty
|
|
CHECK-EMPTY:
|
|
CHECK-NEXT: after empty
|
|
|
|
V: verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
|
|
V-NEXT: {{C}}HECK: before empty{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-10]]:1: note: found here
|
|
V-NEXT: {{^}}before empty{{$}}
|
|
V-NEXT: {{^}}^~~~~~~~~~~~{{$}}
|
|
|
|
V-NEXT: verbose.txt:[[@LINE-10]]:13: remark: {{C}}HECK-EMPTY: expected string found in input
|
|
V-NEXT: {{C}}HECK-EMPTY:{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-16]]:1: note: found here
|
|
V-EMPTY:
|
|
V-NEXT: {{^}}^{{$}}
|
|
|
|
V-NEXT: verbose.txt:[[@LINE-16]]:13: remark: {{C}}HECK-NEXT: expected string found in input
|
|
V-NEXT: {{C}}HECK-NEXT: after empty{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-22]]:1: note: found here
|
|
V-NEXT: {{^}}after empty{{$}}
|
|
V-NEXT: {{^}}^~~~~~~~~~~{{$}}
|
|
|
|
abcdef
|
|
abcdef
|
|
CHECK-DAG: abcdef
|
|
CHECK-DAG: def
|
|
|
|
V-NEXT: verbose.txt:[[@LINE-3]]:12: remark: {{C}}HECK-DAG: expected string found in input
|
|
V-NEXT: {{C}}HECK-DAG: abcdef
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-8]]:1: note: found here
|
|
V-NEXT: {{^}}abcdef{{$}}
|
|
V-NEXT: {{^}}^~~~~~{{$}}
|
|
|
|
VV-NEXT: verbose.txt:[[@LINE-9]]:12: remark: {{C}}HECK-DAG: expected string found in input
|
|
VV-NEXT: {{C}}HECK-DAG: def
|
|
VV-NEXT: {{^}} ^{{$}}
|
|
VV-NEXT: verbose.txt:[[@LINE-15]]:4: note: found here
|
|
VV-NEXT: {{^abcdef$}}
|
|
VV-NEXT: {{^}} ^~~
|
|
VV-NEXT: verbose.txt:[[@LINE-18]]:1: note: match discarded, overlaps earlier DAG match here
|
|
VV-NEXT: {{^}}abcdef{{$}}
|
|
VV-NEXT: {{^}}^~~~~~{{$}}
|
|
|
|
V-NEXT: verbose.txt:[[@LINE-19]]:12: remark: {{C}}HECK-DAG: expected string found in input
|
|
V-NEXT: {{C}}HECK-DAG: def
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-24]]:4: note: found here
|
|
V-NEXT: {{^abcdef$}}
|
|
V-NEXT: {{^}} ^~~
|
|
|
|
xyz
|
|
CHECK: xyz
|
|
CHECK-NOT: {{z}}yx
|
|
|
|
V: verbose.txt:[[@LINE-3]]:8: remark: {{C}}HECK: expected string found in input
|
|
V-NEXT: {{C}}HECK: xyz{{$}}
|
|
V-NEXT: {{^}} ^{{$}}
|
|
V-NEXT: verbose.txt:[[@LINE-7]]:1: note: found here
|
|
V-NEXT: {{^}}xyz{{$}}
|
|
V-NEXT: {{^}}^~~{{$}}
|
|
|
|
VV-NEXT: verbose.txt:[[@LINE-9]]:19: remark: implicit EOF: expected string found in input
|
|
VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
|
|
VV-NEXT: {{^}} ^{{$}}
|
|
VV-NEXT: verbose.txt:[[@LINE+13]]:1: note: found here
|
|
VV-NOT: {{.}}
|
|
VV: {{^}}^
|
|
|
|
VV-NEXT: verbose.txt:[[@LINE-16]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
|
|
VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
|
|
VV-NEXT: {{^}} ^{{$}}
|
|
VV-NEXT: verbose.txt:[[@LINE-20]]:1: note: scanning from here
|
|
VV-NEXT: {{^C}}HECK: xyz{{$}}
|
|
VV-NEXT: {{^}}^{{$}}
|
|
|
|
QUIET-NOT: {{.}}
|
|
V-NOT: {{.}}
|