forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a -D flag to FileCheck to define variables
Summary: This makes it very easy to test files that only differ in a constant value somewhere in the test case. Reviewers: jlebar, hfinkel, chandlerc, probinson Reviewed By: probinson Subscribers: probinson, llvm-commits Differential Revision: https://reviews.llvm.org/D39629 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317572 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
1ed4428
commit 7c37aa1
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; RUN: FileCheck -DVALUE=10 -input-file %s %s | ||
; RUN: not FileCheck -DVALUE=20 -input-file %s %s 2>&1 | FileCheck %s -check-prefix ERRMSG | ||
|
||
Value = 10 | ||
; CHECK: Value = [[VALUE]] | ||
|
||
; ERRMSG: defines.txt:5:10: error: expected string not found in input | ||
; ERRMSG: defines.txt:1:1: note: with variable "VALUE" equal to "20" | ||
; ERRMSG: defines.txt:4:1: note: possible intended match here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters