Skip to content

Fix lint warnings #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Firestore/Example/Tests/API/FIRTimestampTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ - (void)testFromDate {
FIRTimestamp *actual = [FIRTimestamp timestampWithDate:input];
static const int64_t kSecondsFromEpochToReferenceDate = 978307200;
XCTAssertEqual(kSecondsFromEpochToReferenceDate + 1, actual.seconds);
XCTAssertEqual(500000000, actual.nanoseconds);
XCTAssertEqual(actual.nanoseconds, 500000000);

FIRTimestamp *expected =
[[FIRTimestamp alloc] initWithSeconds:(kSecondsFromEpochToReferenceDate + 1)
nanoseconds:500000000];
XCTAssertEqualObjects(expected, actual);
XCTAssertEqualObjects(actual, expected);
}

- (void)testSO8601String {
Expand Down Expand Up @@ -92,8 +92,8 @@ - (void)testCompare {
[[FIRTimestamp alloc] initWithSeconds:12346 nanoseconds:0],
];
for (int i = 0; i < timestamps.count - 1; ++i) {
XCTAssertEqual(NSOrderedAscending, [timestamps[i] compare:timestamps[i + 1]]);
XCTAssertEqual(NSOrderedDescending, [timestamps[i + 1] compare:timestamps[i]]);
XCTAssertEqual([timestamps[i] compare:timestamps[i + 1]], NSOrderedAscending);
XCTAssertEqual([timestamps[i + 1] compare:timestamps[i]], NSOrderedDescending);
}
}

Expand Down
6 changes: 3 additions & 3 deletions Firestore/Example/Tests/Local/FSTQueryCacheTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -89,20 +89,20 @@ - (void)testCanonicalIDCollision {

FSTQueryData *data2 = [self queryDataWithQuery:q2];
[self addQueryData:data2];
XCTAssertEqual(2, [self.queryCache count]);
XCTAssertEqual([self.queryCache count], 2);

XCTAssertEqualObjects([self.queryCache queryDataForQuery:q1], data1);
XCTAssertEqualObjects([self.queryCache queryDataForQuery:q2], data2);

[self removeQueryData:data1];
XCTAssertNil([self.queryCache queryDataForQuery:q1]);
XCTAssertEqualObjects([self.queryCache queryDataForQuery:q2], data2);
XCTAssertEqual(1, [self.queryCache count]);
XCTAssertEqual([self.queryCache count], 1);

[self removeQueryData:data2];
XCTAssertNil([self.queryCache queryDataForQuery:q1]);
XCTAssertNil([self.queryCache queryDataForQuery:q2]);
XCTAssertEqual(0, [self.queryCache count]);
XCTAssertEqual([self.queryCache count], 0);
}

- (void)testSetQueryToNewValue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST(MaybeDocument, Getter) {
TEST(MaybeDocument, Comparison) {
EXPECT_TRUE(MakeMaybeDocument("root/123", Timestamp(456, 123)) <
MakeMaybeDocument("root/456", Timestamp(123, 456)));
// MaybeDocument comparision is purely key-based.
// MaybeDocument comparison is purely key-based.
EXPECT_FALSE(MakeMaybeDocument("root/123", Timestamp(111, 111)) <
MakeMaybeDocument("root/123", Timestamp(222, 222)));

Expand Down