Home | History | Annotate | Download | only in ARCMT
      1 // RUN: rm -rf %t
      2 // RUN: %clang_cc1 -objcmt-migrate-property -mt-migrate-directory %t %s -x objective-c -fobjc-runtime-has-weak -fobjc-arc -fobjc-default-synthesize-properties -triple x86_64-apple-darwin11
      3 // RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
      4 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -fobjc-runtime-has-weak -fobjc-arc -fobjc-default-synthesize-properties %s.result
      5 
      6 typedef long NSInteger;
      7 typedef unsigned long NSUInteger;
      8 
      9 #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
     10 #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type
     11 
     12 enum {
     13   blah,
     14   blarg
     15 };
     16 typedef NSInteger wibble;
     17 
     18 enum {
     19     UIViewAutoresizingNone                 = 0,
     20     UIViewAutoresizingFlexibleLeftMargin,
     21     UIViewAutoresizingFlexibleWidth,
     22     UIViewAutoresizingFlexibleRightMargin,
     23     UIViewAutoresizingFlexibleTopMargin,
     24     UIViewAutoresizingFlexibleHeight,
     25     UIViewAutoresizingFlexibleBottomMargin
     26 };
     27 typedef NSUInteger UITableViewCellStyle;
     28 
     29 typedef enum {
     30     UIViewAnimationTransitionNone,
     31     UIViewAnimationTransitionFlipFromLeft,
     32     UIViewAnimationTransitionFlipFromRight,
     33     UIViewAnimationTransitionCurlUp,
     34     UIViewAnimationTransitionCurlDown,
     35 } UIViewAnimationTransition;
     36 
     37 typedef enum {
     38     UIViewOne   = 0,
     39     UIViewTwo   = 1 << 0,
     40     UIViewThree = 1 << 1,
     41     UIViewFour  = 1 << 2,
     42     UIViewFive  = 1 << 3,
     43     UIViewSix   = 1 << 4,
     44     UIViewSeven = 1 << 5
     45 } UITableView;
     46 
     47 enum {
     48   UIOne = 0,
     49   UITwo = 0x1,
     50   UIthree = 0x8,
     51   UIFour = 0x100
     52 };
     53 typedef NSInteger UI;
     54 
     55 typedef enum {
     56   UIP2One = 0,
     57   UIP2Two = 0x1,
     58   UIP2three = 0x8,
     59   UIP2Four = 0x100
     60 } UIPOWER2;
     61 
     62 enum {
     63   UNOne,
     64   UNTwo
     65 };
     66 
     67