[llvm] r189060 - FileCheckize some tests.
Bill Wendling
isanbard at gmail.com
Thu Aug 22 13:46:06 PDT 2013
Author: void
Date: Thu Aug 22 15:46:05 2013
New Revision: 189060
URL: http://llvm.org/viewvc/llvm-project?rev=189060&view=rev
Log:
FileCheckize some tests.
Modified:
llvm/trunk/test/TableGen/2006-09-18-LargeInt.td
llvm/trunk/test/TableGen/DefmInherit.td
llvm/trunk/test/TableGen/DefmInsideMultiClass.td
llvm/trunk/test/TableGen/LazyChange.td
llvm/trunk/test/TableGen/LetInsideMultiClasses.td
llvm/trunk/test/TableGen/ListOfList.td
llvm/trunk/test/TableGen/MultiClass.td
llvm/trunk/test/TableGen/MultiClassDefName.td
llvm/trunk/test/TableGen/MultiClassInherit.td
llvm/trunk/test/TableGen/TargetInstrSpec.td
llvm/trunk/test/TableGen/cast.td
llvm/trunk/test/TableGen/foreach.td
llvm/trunk/test/TableGen/lisp.td
llvm/trunk/test/TableGen/strconcat.td
llvm/trunk/test/TableGen/subst.td
Modified: llvm/trunk/test/TableGen/2006-09-18-LargeInt.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/2006-09-18-LargeInt.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/2006-09-18-LargeInt.td (original)
+++ llvm/trunk/test/TableGen/2006-09-18-LargeInt.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,6 @@
-// RUN: llvm-tblgen %s | grep -- 4294901760
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: 4294901760
def X {
int Y = 0xFFFF0000;
Modified: llvm/trunk/test/TableGen/DefmInherit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/DefmInherit.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/DefmInherit.td (original)
+++ llvm/trunk/test/TableGen/DefmInherit.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,10 @@
-// RUN: llvm-tblgen %s | grep "zing = 4" | count 4
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK-NOT: zing = 4
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/DefmInsideMultiClass.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/DefmInsideMultiClass.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/DefmInsideMultiClass.td (original)
+++ llvm/trunk/test/TableGen/DefmInsideMultiClass.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,7 @@
-// RUN: llvm-tblgen %s | grep ADDPSrr | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: ADDPSrr
+// CHECK-NOT: ADDPSrr
class Instruction<bits<4> opc, string Name> {
bits<4> opcode = opc;
Modified: llvm/trunk/test/TableGen/LazyChange.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/LazyChange.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/LazyChange.td (original)
+++ llvm/trunk/test/TableGen/LazyChange.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,6 @@
-// RUN: llvm-tblgen %s | grep "int Y = 3"
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: int Y = 3
class C {
int X = 4;
Modified: llvm/trunk/test/TableGen/LetInsideMultiClasses.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/LetInsideMultiClasses.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/LetInsideMultiClasses.td (original)
+++ llvm/trunk/test/TableGen/LetInsideMultiClasses.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,9 @@
-// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: bit IsDouble = 1;
+// CHECK: bit IsDouble = 1;
+// CHECK: bit IsDouble = 1;
+// CHECK-NOT: bit IsDouble = 1;
class Instruction<bits<4> opc, string Name> {
bits<4> opcode = opc;
Modified: llvm/trunk/test/TableGen/ListOfList.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/ListOfList.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/ListOfList.td (original)
+++ llvm/trunk/test/TableGen/ListOfList.td Thu Aug 22 15:46:05 2013
@@ -1,6 +1,4 @@
-// RUN llvm-tblgen %s | FileCheck %s
-
-// RUN: llvm-tblgen %s | grep "foo" | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
class Base<string t> {
string text = t;
@@ -11,3 +9,4 @@ class Derived<list<list<string>> thetext
def FOO : Derived<[["foo"]]>;
// CHECK: text = "foo"
+// CHECK-NOT: text = "foo"
Modified: llvm/trunk/test/TableGen/MultiClass.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClass.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClass.td (original)
+++ llvm/trunk/test/TableGen/MultiClass.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,8 @@
-// RUN: llvm-tblgen %s | grep "zing = 4" | count 2
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK-NOT: zing = 4
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/MultiClassDefName.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClassDefName.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClassDefName.td (original)
+++ llvm/trunk/test/TableGen/MultiClassDefName.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,7 @@
-// RUN: llvm-tblgen %s | grep WorldHelloCC | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: WorldHelloCC
+// CHECK-NOT: WorldHelloCC
class C<string n> {
string name = n;
Modified: llvm/trunk/test/TableGen/MultiClassInherit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/MultiClassInherit.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/MultiClassInherit.td (original)
+++ llvm/trunk/test/TableGen/MultiClassInherit.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,35 @@
-// RUN: llvm-tblgen %s | grep "zing = 4" | count 28
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// "zing = 4" x 28
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK: zing = 4
+// CHECK-NOT: zing = 4
class C1<int A, string B> {
int bar = A;
Modified: llvm/trunk/test/TableGen/TargetInstrSpec.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/TargetInstrSpec.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/TargetInstrSpec.td (original)
+++ llvm/trunk/test/TableGen/TargetInstrSpec.td Thu Aug 22 15:46:05 2013
@@ -1,5 +1,10 @@
-// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))\]' | count 1
-// RUN: llvm-tblgen %s | grep '\[(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))\]' | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
+// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_pd VR128:$src1, VR128:$src2))]
+
+// CHECK: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))]
+// CHECK-NOT: [(set VR128:$dst, (int_x86_sse2_add_ps VR128:$src1, VR128:$src2))]
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/cast.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/cast.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/cast.td (original)
+++ llvm/trunk/test/TableGen/cast.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,9 @@
-// RUN: llvm-tblgen %s | grep "add_ps" | count 3
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: add_ps
+// CHECK: add_ps
+// CHECK: add_ps
+// CHECK-NOT: add_ps
class ValueType<int size, int value> {
int Size = size;
Modified: llvm/trunk/test/TableGen/foreach.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/foreach.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/foreach.td (original)
+++ llvm/trunk/test/TableGen/foreach.td Thu Aug 22 15:46:05 2013
@@ -1,6 +1,13 @@
-// RUN: llvm-tblgen %s | grep 'Jr' | count 2
-// RUN: llvm-tblgen %s | grep 'Sr' | count 2
-// RUN: llvm-tblgen %s | grep '"NAME"' | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: Classes
+// CHECK: Sr
+// CHECK: Jr
+// CHECK: "NAME"
+
+// CHECK: Defs
+// CHECK: Jr
+// CHECK: Sr
// Variables for foreach
class decls {
Modified: llvm/trunk/test/TableGen/lisp.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/lisp.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/lisp.td (original)
+++ llvm/trunk/test/TableGen/lisp.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,19 @@
-// RUN: llvm-tblgen %s | grep ""
+// RUN: llvm-tblgen %s
+
+// CHECK: def One {
+// CHECK-NEXT: list<string> names = ["Jeffrey Sinclair"];
+// CHECK-NEXT: string element = "Jeffrey Sinclair";
+// CHECK-NEXT: list<string> rest = [];
+// CHECK-NEXT: int null = 1;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def Three {
+// CHECK-NEXT: list<string> names = ["Tom", "Dick", "Harry"];
+// CHECK-NEXT: string element = "Tom";
+// CHECK-NEXT: list<string> rest = ["Dick", "Harry"];
+// CHECK-NEXT: int null = 0;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
class List<list<string> n> {
list<string> names = n;
Modified: llvm/trunk/test/TableGen/strconcat.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/strconcat.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/strconcat.td (original)
+++ llvm/trunk/test/TableGen/strconcat.td Thu Aug 22 15:46:05 2013
@@ -1,4 +1,6 @@
-// RUN: llvm-tblgen %s | grep fufoo
+// RUN: llvm-tblgen %s | FileCheck %s
+
+// CHECK: fufoo
class Y<string S> {
string T = !strconcat(S, "foo");
Modified: llvm/trunk/test/TableGen/subst.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/subst.td?rev=189060&r1=189059&r2=189060&view=diff
==============================================================================
--- llvm/trunk/test/TableGen/subst.td (original)
+++ llvm/trunk/test/TableGen/subst.td Thu Aug 22 15:46:05 2013
@@ -1,9 +1,4 @@
-// RUN: llvm-tblgen %s | grep "Smith" | count 7
-// RUN: llvm-tblgen %s | grep "Johnson" | count 2
-// RUN: llvm-tblgen %s | grep "FIRST" | count 1
-// RUN: llvm-tblgen %s | grep "LAST" | count 1
-// RUN: llvm-tblgen %s | grep "TVAR" | count 2
-// RUN: llvm-tblgen %s | grep "Bogus" | count 1
+// RUN: llvm-tblgen %s | FileCheck %s
class Honorific<string t> {
string honorific = t;
@@ -27,3 +22,56 @@ def JohnSmith : AName<"FIRST LAST", TVAR
def JaneSmith : AName<"Jane LAST", Ms>;
def JohnSmithJones : AName<"FIRST LAST-Jones", Mr>;
def JimmyJohnson : AName<"Jimmy Johnson", Mr>;
+
+// CHECK: ------------- Classes -----------------
+// CHECK-NEXT: class AName<string AName:name = ?, Honorific AName:honorific = ?> {
+// CHECK-NEXT: string name = !subst("FIRST", "John", !subst("LAST", "Smith", AName:name));
+// CHECK-NEXT: Honorific honorific = !subst(TVAR, Mr, AName:honorific);
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: class Honorific<string Honorific:t = ?> {
+// CHECK-NEXT: string honorific = Honorific:t;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: class Name<string Name:n = ?, Honorific Name:t = ?> {
+// CHECK-NEXT: string name = Name:n;
+// CHECK-NEXT: Honorific honorific = Name:t;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: ------------- Defs -----------------
+// CHECK-NEXT: def JaneSmith {
+// CHECK-NEXT: string name = "Jane Smith";
+// CHECK-NEXT: Honorific honorific = Ms;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def JimmyJohnson {
+// CHECK-NEXT: string name = "Jimmy Johnson";
+// CHECK-NEXT: Honorific honorific = Mr;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def JohnSmith {
+// CHECK-NEXT: string name = "John Smith";
+// CHECK-NEXT: Honorific honorific = Mr;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def JohnSmithJones {
+// CHECK-NEXT: string name = "John Smith-Jones";
+// CHECK-NEXT: Honorific honorific = Mr;
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def Mr
+// CHECK-NEXT: string honorific = "Mr.";
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def Mrs {
+// CHECK-NEXT: string honorific = "Mrs.";
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def Ms {
+// CHECK-NEXT: string honorific = "Ms.";
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
+// CHECK-NEXT: def TVAR {
+// CHECK-NEXT: string honorific = "Bogus";
+// CHECK-NEXT: string NAME = ?;
+// CHECK-NEXT: }
More information about the llvm-commits
mailing list