From 4278047f64c9a364a5af61fbed785db3bdcee206 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 15 Jul 2016 20:40:24 +0000 Subject: [PATCH] [test/objcmt] Add a follow-up test case for r275600. llvm-svn: 275609 --- clang/test/ARCMT/whitelisted/header1.h | 2 ++ clang/test/ARCMT/whitelisted/header1.h.result | 2 ++ clang/test/ARCMT/whitelisted/header2.h | 3 +++ clang/test/ARCMT/whitelisted/header2.h.result | 3 +++ clang/test/ARCMT/whitelisted/objcmt-with-whitelist.m | 4 ++-- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/clang/test/ARCMT/whitelisted/header1.h b/clang/test/ARCMT/whitelisted/header1.h index d94b9f7..33f77aa 100644 --- a/clang/test/ARCMT/whitelisted/header1.h +++ b/clang/test/ARCMT/whitelisted/header1.h @@ -4,3 +4,5 @@ -(void)setProp:(int)p; +(id)i1; @end + +typedef long NSInteger; diff --git a/clang/test/ARCMT/whitelisted/header1.h.result b/clang/test/ARCMT/whitelisted/header1.h.result index 65cbd26..c7cf109 100644 --- a/clang/test/ARCMT/whitelisted/header1.h.result +++ b/clang/test/ARCMT/whitelisted/header1.h.result @@ -3,3 +3,5 @@ @property (nonatomic) int prop; +(instancetype)i1; @end + +typedef long NSInteger; diff --git a/clang/test/ARCMT/whitelisted/header2.h b/clang/test/ARCMT/whitelisted/header2.h index c7577ed..ac3888c 100644 --- a/clang/test/ARCMT/whitelisted/header2.h +++ b/clang/test/ARCMT/whitelisted/header2.h @@ -1,4 +1,7 @@ +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +typedef enum : NSInteger {five} ApplicableEnum; + @interface I2 : NSObject -(int)prop; -(void)setProp:(int)p; diff --git a/clang/test/ARCMT/whitelisted/header2.h.result b/clang/test/ARCMT/whitelisted/header2.h.result index b1b5270..3226e71 100644 --- a/clang/test/ARCMT/whitelisted/header2.h.result +++ b/clang/test/ARCMT/whitelisted/header2.h.result @@ -1,4 +1,7 @@ +#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type +typedef NS_ENUM(NSInteger, ApplicableEnum) {five}; + @interface I2 : NSObject @property (nonatomic) int prop; @end diff --git a/clang/test/ARCMT/whitelisted/objcmt-with-whitelist.m b/clang/test/ARCMT/whitelisted/objcmt-with-whitelist.m index bef82c8..0ea714f 100644 --- a/clang/test/ARCMT/whitelisted/objcmt-with-whitelist.m +++ b/clang/test/ARCMT/whitelisted/objcmt-with-whitelist.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype %s -triple x86_64-apple-darwin11 -migrate -o %t.remap +// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-migrate-ns-macros %s -triple x86_64-apple-darwin11 -migrate -o %t.remap // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result %S/header2.h.result -// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap +// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-migrate-ns-macros -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result @interface NSObject -- 2.7.4