From 8e70791465f9b5e4bb75dfc18de4a4ed90961974 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Mon, 23 Apr 2018 10:00:02 -0700 Subject: Update travis to use Xcode 9.3 (#1163) * Workaround already installed brew error message * NSJSONSerialization of doubles is now fixed on OSX --- .travis.yml | 6 +-- .../Tests/Unit/FLevelDBStorageEngineTests.m | 47 ---------------------- 2 files changed, 3 insertions(+), 50 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a8e4ca..f395fd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: osx -osx_image: xcode9.2 +osx_image: xcode9.3 language: objective-c cache: - bundler @@ -61,8 +61,8 @@ jobs: before_install: - bundle install - gem install xcpretty - - brew install cmake - - brew install go # Somehow the build for Abseil requires this. + - brew outdated cmake || brew upgrade cmake + - brew outdated go || brew upgrade go # Somehow the build for Abseil requires this. - ./scripts/if_changed.sh bundle exec pod install --project-directory=Example --repo-update - ./scripts/if_changed.sh bundle exec pod install --project-directory=Firestore/Example --no-repo-update script: diff --git a/Example/Database/Tests/Unit/FLevelDBStorageEngineTests.m b/Example/Database/Tests/Unit/FLevelDBStorageEngineTests.m index d2415e8..6170397 100644 --- a/Example/Database/Tests/Unit/FLevelDBStorageEngineTests.m +++ b/Example/Database/Tests/Unit/FLevelDBStorageEngineTests.m @@ -451,53 +451,6 @@ XCTAssertEqualObjects([engine serverCacheAtPath:PATH(@"foo/fails")], [FEmptyNode emptyNode]); } -- (void)testExtremeDoublesAsTrackedQuery { -#ifdef TARGET_OS_IOS - if ([[NSProcessInfo processInfo] operatingSystemVersion].majorVersion == 11) { - // NSJSONSerialization on iOS 11 correctly serializes small and large doubles. - return; - } -#endif - - FLevelDBStorageEngine *engine = [self cleanStorageEngine]; - id tinyDouble = NODE(@(2.225073858507201e-308)); - - FQueryParams *params = [[[FQueryParams defaultInstance] startAt:tinyDouble] endAt:tinyDouble]; - FTrackedQuery *doesNotWork = [[FTrackedQuery alloc] initWithId:0 - query:[[FQuerySpec alloc] initWithPath:PATH(@"foo") params:params] - lastUse:0 - isActive:NO]; - FTrackedQuery *doesWork = [[FTrackedQuery alloc] initWithId:1 - query:[FQuerySpec defaultQueryAtPath:PATH(@"bar")] - lastUse:0 - isActive:NO]; - [engine saveTrackedQuery:doesNotWork]; - [engine saveTrackedQuery:doesWork]; - // One will be dropped, the other should still be there - XCTAssertEqualObjects([engine loadTrackedQueries], @[doesWork]); -} - -- (void)testExtremeDoublesAsUserWrites { -#ifdef TARGET_OS_IOS - if ([[NSProcessInfo processInfo] operatingSystemVersion].majorVersion == 11) { - // NSJSONSerialization on iOS 11 correctly serializes small and large doubles. - return; - } -#endif - FLevelDBStorageEngine *engine = [self cleanStorageEngine]; - id tinyDouble = NODE(@(2.225073858507201e-308)); - - [engine saveUserOverwrite:tinyDouble atPath:PATH(@"foo") writeId:1]; - [engine saveUserMerge:[[FCompoundWrite emptyWrite] addWrite:tinyDouble atPath:PATH(@"bar")] atPath:PATH(@"foo") writeId:2]; - [engine saveUserOverwrite:NODE(@"should-work") atPath:PATH(@"other") writeId:3]; - - // The other two should be dropped and only the valid should remain - XCTAssertEqualObjects([engine userWrites], @[[[FWriteRecord alloc] initWithPath:PATH(@"other") - overwrite:NODE(@"should-work") - writeId:3 - visible:YES]]); -} - - (void)testLongValuesDontLosePrecision { id longValue = @1542405709418655810; id floatValue = @2.47; -- cgit v1.2.3