• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6typedef long NSInteger;
7typedef 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
12typedef NS_ENUM(NSInteger, wibble) {
13  blah,
14  blarg
15};
16
17
18typedef NS_OPTIONS(NSUInteger, UITableViewCellStyle) {
19    UIViewAutoresizingNone                 = 0,
20    UIViewAutoresizingFlexibleLeftMargin,
21    UIViewAutoresizingFlexibleWidth,
22    UIViewAutoresizingFlexibleRightMargin,
23    UIViewAutoresizingFlexibleTopMargin,
24    UIViewAutoresizingFlexibleHeight,
25    UIViewAutoresizingFlexibleBottomMargin
26};
27
28
29typedef NS_ENUM(NSInteger, UIViewAnimationTransition) {
30    UIViewAnimationTransitionNone,
31    UIViewAnimationTransitionFlipFromLeft,
32    UIViewAnimationTransitionFlipFromRight,
33    UIViewAnimationTransitionCurlUp,
34    UIViewAnimationTransitionCurlDown,
35} ;
36
37typedef NS_OPTIONS(NSUInteger, UITableView) {
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} ;
46
47typedef NS_OPTIONS(NSUInteger, UI) {
48  UIOne = 0,
49  UITwo = 0x1,
50  UIthree = 0x8,
51  UIFour = 0x100
52};
53
54
55typedef NS_OPTIONS(NSUInteger, UIPOWER2) {
56  UIP2One = 0,
57  UIP2Two = 0x1,
58  UIP2three = 0x8,
59  UIP2Four = 0x100
60} ;
61
62enum {
63  UNOne,
64  UNTwo
65};
66
67