r227843 - FileCheck'ize CodeGenObjC test

David Majnemer david.majnemer at gmail.com
Mon Feb 2 15:40:30 PST 2015


Good idea, r227896.

On Mon, Feb 2, 2015 at 12:47 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Mon, Feb 2, 2015 at 11:30 AM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
>> Author: majnemer
>> Date: Mon Feb  2 13:30:54 2015
>> New Revision: 227843
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=227843&view=rev
>> Log:
>> FileCheck'ize CodeGenObjC test
>>
>> This fixes PR22437.
>>
>> Modified:
>>     cfe/trunk/test/CodeGenObjC/encode-test-5.m
>>
>> Modified: cfe/trunk/test/CodeGenObjC/encode-test-5.m
>> URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test-5.m?rev=227843&r1=227842&r2=227843&view=diff
>>
>> ==============================================================================
>> --- cfe/trunk/test/CodeGenObjC/encode-test-5.m (original)
>> +++ cfe/trunk/test/CodeGenObjC/encode-test-5.m Mon Feb  2 13:30:54 2015
>> @@ -1,16 +1,21 @@
>> -// RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-llvm -o %t %s
>> +// RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-llvm -o - %s |
>> FileCheck %s
>>
>
> The other thing we tend to do to sanitize test output is to pipe input ("<
> %s") rather than specifying the file directly to the tool (this avoids the
> filename becoming part of the output).
>
>
>>
>> -// RUN: grep ji.00 %t | count 1
>> +// CHECK-DAG: @[[complex_int:.*]] = private unnamed_addr constant [3 x
>> i8] c"ji\00", align 1
>> +// CHECK-DAG: @a = global i8* getelementptr inbounds ([3 x i8]*
>> @[[complex_int]], i32 0, i32 0), align 8
>>  char *a = @encode(_Complex int);
>>
>> -// RUN: grep jf.00 %t | count 1
>> +// CHECK-DAG: @[[complex_float:.*]] = private unnamed_addr constant [3 x
>> i8] c"jf\00", align 1
>> +// CHECK-DAG: @b = global i8* getelementptr inbounds ([3 x i8]*
>> @[[complex_float]], i32 0, i32 0), align 8
>>  char *b = @encode(_Complex float);
>>
>> -// RUN: grep jd.00 %t | count 1
>> +// CHECK-DAG: @[[complex_double:.*]] = private unnamed_addr constant [3
>> x i8] c"jd\00", align 1
>> +// CHECK-DAG: @c = global i8* getelementptr inbounds ([3 x i8]*
>> @[[complex_double]], i32 0, i32 0), align 8
>>  char *c = @encode(_Complex double);
>>
>> -// RUN: grep "t.00" %t | count 1
>> +// CHECK-DAG: @[[int_128:.*]] = private unnamed_addr constant [2 x i8]
>> c"t\00", align 1
>> +// CHECK-DAG: @e = global i8* getelementptr inbounds ([2 x i8]*
>> @[[int_128]], i32 0, i32 0), align 8
>>  char *e = @encode(__int128_t);
>>
>> -// RUN: grep "T.00" %t | count 1
>> +// CHECK-DAG: @[[uint_128:.*]] = private unnamed_addr constant [2 x i8]
>> c"T\00", align 1
>> +// CHECK-DAG: @f = global i8* getelementptr inbounds ([2 x i8]*
>> @[[uint_128]], i32 0, i32 0), align 8
>>  char *f = @encode(__uint128_t);
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150202/d0a51fe5/attachment.html>


More information about the cfe-commits mailing list