summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/oc/10022-indent-objc-block.m
blob: 1a97aa27f9efede41b1ac92664718e462e7db9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
const auto c =
  [FDSTapTargetComponent
   accessibilityContext:{
     .accessibilityLabel = ^{
       return [AccessibilityLabelBuilder build];
     }
   }];

methodCall1(^{
  send(component1);
},
            x);

methodCall2( ^ {
  send(component2);
});

[array block:^ (id obj, NSUInteger idx, BOOL *stop) {
         NSLog(@"Object at index %lu is %@", idx, obj);
}];


[UIView animateWithDuration:3.0f animation:^{
                                   LOG(@"animate");
                                 }
 completion:^(BOOL finished){
   LOG(@"finished");
 }];

[UIView
 animationBlock: ^ {
   [[Log alloc] callback:^NSString *(NSString *result){
                  return @"log";
   }];
 }
 completion:^(BOOL finished){
   LOG(@"finished");
 }];


methodCall3(x, ^KSC::ActionCell::Item (Item item) {
  variant.action.send(component);
});

methodCall4(  x, ^ id (Component *c) {
  NSLog(@"methodCall4");
});

methodCall5(  ^ id (Component *c) {
  NSLog(@"methodCall5");
});

methodCall6(  ^(NSString *)(Component *c) {
  return @"methodCall6";
});

methodCall7(^ (Component *c) {
  NSLog(@"methodCall7");
}, y);

methodCall8(x,  ^(Component *c) {
  NSLog(@"methodCall8");
}, y);


[Object callMethod:xArg
 block:^id (Component *c) {
   NSLog(@"methodCall4");
 }];

[Object callMethod:xArg
 block:^id (Component *c) {
   NSLog(@"methodCall5");
 }];

[Object callMethod:xArg block:^(NSString *)(Component *c) {
                          return @"methodCall6";
}];


[Object callMethod:xArg
 block:^ (Component *c) {
   NSLog(@"methodCall7");
 }
 yMethod:yArg];

[Object callMethod:xArg
 block:^(Component *c) {
   NSLog(@"methodCall8");
 }
 yMethod:yArg];

[Object callMethod:xArg
 block:^(NSString *)(Component *c1) {
   [Object callMethod:xArg block:^(Component *c) {
                             NSLog(@"methodCal9");
                           }
    yMethod:yArg];
 }
 anotherBlock:^(NSString *)(Component *c2) {
   return @"methodCall10";
 }
 yetAnotherBlock:^(NSString *)(Component *c3) {
   return @"methodCall11";
 }];

[dialog
 dismissWithCompletion:^{
   _deleteConversation(
     strongSelf->_session,
     ^{
       if (auto const innerStrongSelf = weakSelf) {
         [NavigationCoordinator(innerStrongSelf)
          dismissViewController:innerStrongSelf
          completion:nil];
       }
     });
 }];


[FlexboxComponent
 newWithView:{
   {
     .accessibilityLabel = ^{
       return
       [[[[AccessibilityLabelBuilder builder]
          appendPhrase:title]
         appendPhrase:body]
        getResult];
     },
   }
 }];


MainComponent(
    .builder = ^{
  return
  value;
},
  param1,
  param2,
  );

KSC::map(
  _items,
  ^ ActionCell::Item (Item item)  {
  return x;
}
  );