Skip to content

Commit

Permalink
[pigeon] Update auto-formatting (#1251)
Browse files Browse the repository at this point in the history
New tests were added to Pigeon between the clang-format change PR
running tests and landing, so `format` broke the tree in post-submit due
to the new file not having the updated formatting.

Fixes the tree.
  • Loading branch information
stuartmorgan authored Mar 18, 2022
1 parent 017d64d commit b279959
Showing 1 changed file with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

///////////////////////////////////////////////////////////////////////////////////////////
@interface NullFieldsSearchRequest ()
+ (NullFieldsSearchRequest*)fromMap:(NSDictionary*)dict;
- (NSDictionary*)toMap;
+ (NullFieldsSearchRequest *)fromMap:(NSDictionary *)dict;
- (NSDictionary *)toMap;
@end

///////////////////////////////////////////////////////////////////////////////////////////
@interface NullFieldsSearchReply ()
+ (NullFieldsSearchReply*)fromMap:(NSDictionary*)dict;
- (NSDictionary*)toMap;
+ (NullFieldsSearchReply *)fromMap:(NSDictionary *)dict;
- (NSDictionary *)toMap;
@end

///////////////////////////////////////////////////////////////////////////////////////////
Expand All @@ -27,16 +27,16 @@ @interface NullFieldsTest : XCTestCase
@implementation NullFieldsTest

- (void)testMakeWithValues {
NullFieldsSearchRequest* request = [NullFieldsSearchRequest makeWithQuery:@"hello"];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest makeWithQuery:@"hello"];

NullFieldsSearchReply* reply =
NullFieldsSearchReply *reply =
[NullFieldsSearchReply makeWithResult:@"result"
error:@"error"
indices:@[ @1, @2, @3 ]
request:request
type:NullFieldsSearchReplyTypeSuccess];

NSArray* indices = @[ @1, @2, @3 ];
NSArray *indices = @[ @1, @2, @3 ];
XCTAssertEqualObjects(@"result", reply.result);
XCTAssertEqualObjects(@"error", reply.error);
XCTAssertEqualObjects(indices, reply.indices);
Expand All @@ -45,12 +45,12 @@ - (void)testMakeWithValues {
}

- (void)testMakeRequestWithNulls {
NullFieldsSearchRequest* request = [NullFieldsSearchRequest makeWithQuery:nil];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest makeWithQuery:nil];
XCTAssertNil(request.query);
}

- (void)testMakeReplyWithNulls {
NullFieldsSearchReply* reply =
NullFieldsSearchReply *reply =
[NullFieldsSearchReply makeWithResult:nil
error:nil
indices:nil
Expand All @@ -64,23 +64,23 @@ - (void)testMakeReplyWithNulls {
}

- (void)testRequestFromMapWithValues {
NSDictionary* map = @{
NSDictionary *map = @{
@"query" : @"hello",
};
NullFieldsSearchRequest* request = [NullFieldsSearchRequest fromMap:map];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest fromMap:map];
XCTAssertEqualObjects(@"hello", request.query);
}

- (void)testRequestFromMapWithNulls {
NSDictionary* map = @{
NSDictionary *map = @{
@"query" : [NSNull null],
};
NullFieldsSearchRequest* request = [NullFieldsSearchRequest fromMap:map];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest fromMap:map];
XCTAssertNil(request.query);
}

- (void)testReplyFromMapWithValues {
NSDictionary* map = @{
NSDictionary *map = @{
@"result" : @"result",
@"error" : @"error",
@"indices" : @[ @1, @2, @3 ],
Expand All @@ -90,8 +90,8 @@ - (void)testReplyFromMapWithValues {
@"type" : @0,
};

NSArray* indices = @[ @1, @2, @3 ];
NullFieldsSearchReply* reply = [NullFieldsSearchReply fromMap:map];
NSArray *indices = @[ @1, @2, @3 ];
NullFieldsSearchReply *reply = [NullFieldsSearchReply fromMap:map];
XCTAssertEqualObjects(@"result", reply.result);
XCTAssertEqualObjects(@"error", reply.error);
XCTAssertEqualObjects(indices, reply.indices);
Expand All @@ -100,14 +100,14 @@ - (void)testReplyFromMapWithValues {
}

- (void)testReplyFromMapWithNulls {
NSDictionary* map = @{
NSDictionary *map = @{
@"result" : [NSNull null],
@"error" : [NSNull null],
@"indices" : [NSNull null],
@"request" : [NSNull null],
@"type" : [NSNull null],
};
NullFieldsSearchReply* reply = [NullFieldsSearchReply fromMap:map];
NullFieldsSearchReply *reply = [NullFieldsSearchReply fromMap:map];
XCTAssertNil(reply.result);
XCTAssertNil(reply.error);
XCTAssertNil(reply.indices);
Expand All @@ -116,26 +116,26 @@ - (void)testReplyFromMapWithNulls {
}

- (void)testRequestToMapWithValuess {
NullFieldsSearchRequest* request = [NullFieldsSearchRequest makeWithQuery:@"hello"];
NSDictionary* dict = [request toMap];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest makeWithQuery:@"hello"];
NSDictionary *dict = [request toMap];
XCTAssertEqual(@"hello", dict[@"query"]);
}

- (void)testRequestToMapWithNulls {
NullFieldsSearchRequest* request = [NullFieldsSearchRequest makeWithQuery:nil];
NSDictionary* dict = [request toMap];
NullFieldsSearchRequest *request = [NullFieldsSearchRequest makeWithQuery:nil];
NSDictionary *dict = [request toMap];
XCTAssertEqual([NSNull null], dict[@"query"]);
}

- (void)testReplyToMapWithValuess {
NullFieldsSearchReply* reply =
NullFieldsSearchReply *reply =
[NullFieldsSearchReply makeWithResult:@"result"
error:@"error"
indices:@[ @1, @2, @3 ]
request:[NullFieldsSearchRequest makeWithQuery:@"hello"]
type:NullFieldsSearchReplyTypeSuccess];
NSDictionary* dict = [reply toMap];
NSArray* indices = @[ @1, @2, @3 ];
NSDictionary *dict = [reply toMap];
NSArray *indices = @[ @1, @2, @3 ];
XCTAssertEqualObjects(@"result", dict[@"result"]);
XCTAssertEqualObjects(@"error", dict[@"error"]);
XCTAssertEqualObjects(indices, dict[@"indices"]);
Expand All @@ -144,13 +144,13 @@ - (void)testReplyToMapWithValuess {
}

- (void)testReplyToMapWithNulls {
NullFieldsSearchReply* reply =
NullFieldsSearchReply *reply =
[NullFieldsSearchReply makeWithResult:nil
error:nil
indices:nil
request:nil
type:NullFieldsSearchReplyTypeSuccess];
NSDictionary* dict = [reply toMap];
NSDictionary *dict = [reply toMap];
XCTAssertEqual([NSNull null], dict[@"result"]);
XCTAssertEqual([NSNull null], dict[@"error"]);
XCTAssertEqual([NSNull null], dict[@"indices"]);
Expand Down

0 comments on commit b279959

Please sign in to comment.