From 515625c47fab947f82d7f8fc8daef885e56a7df6 Mon Sep 17 00:00:00 2001 From: Gil Date: Thu, 1 Feb 2018 07:55:49 -0800 Subject: Remove predecessorKey,Object,Document, etc (#735) This is dead code. I think it was probably useful in the RTDB because of the way it notified of changes, but we give changes with indexes in Firestore so I think we don't need it. --- .../Immutable/Tests/FSTArraySortedDictionaryTests.m | 19 ------------------- .../Immutable/Tests/FSTTreeSortedDictionaryTests.m | 19 ------------------- 2 files changed, 38 deletions(-) (limited to 'Firestore/third_party/Immutable/Tests') diff --git a/Firestore/third_party/Immutable/Tests/FSTArraySortedDictionaryTests.m b/Firestore/third_party/Immutable/Tests/FSTArraySortedDictionaryTests.m index 2099a26..bf17496 100644 --- a/Firestore/third_party/Immutable/Tests/FSTArraySortedDictionaryTests.m +++ b/Firestore/third_party/Immutable/Tests/FSTArraySortedDictionaryTests.m @@ -252,25 +252,6 @@ XCTAssertEqual((int)next, (int)toInsert.count, @"Check we traversed all of the items"); } -- (void)testPredecessorKey { - FSTArraySortedDictionary *map = - [[FSTArraySortedDictionary alloc] initWithComparator:[self defaultComparator]]; - map = [map dictionaryBySettingObject:@1 forKey:@1]; - map = [map dictionaryBySettingObject:@50 forKey:@50]; - map = [map dictionaryBySettingObject:@3 forKey:@3]; - map = [map dictionaryBySettingObject:@4 forKey:@4]; - map = [map dictionaryBySettingObject:@7 forKey:@7]; - map = [map dictionaryBySettingObject:@9 forKey:@9]; - - XCTAssertNil([map predecessorKey:@1], @"First object doesn't have a predecessor"); - XCTAssertEqualObjects([map predecessorKey:@3], @1, @"@1"); - XCTAssertEqualObjects([map predecessorKey:@4], @3, @"@3"); - XCTAssertEqualObjects([map predecessorKey:@7], @4, @"@4"); - XCTAssertEqualObjects([map predecessorKey:@9], @7, @"@7"); - XCTAssertEqualObjects([map predecessorKey:@50], @9, @"@9"); - XCTAssertThrows([map predecessorKey:@777], @"Expect exception about nonexistent key"); -} - // This is a macro instead of a method so that the failures show on the proper lines. #define ASSERT_ENUMERATOR(enumerator, start, end, step) \ do { \ diff --git a/Firestore/third_party/Immutable/Tests/FSTTreeSortedDictionaryTests.m b/Firestore/third_party/Immutable/Tests/FSTTreeSortedDictionaryTests.m index 344efba..3e06b30 100644 --- a/Firestore/third_party/Immutable/Tests/FSTTreeSortedDictionaryTests.m +++ b/Firestore/third_party/Immutable/Tests/FSTTreeSortedDictionaryTests.m @@ -437,25 +437,6 @@ } } -- (void)testPredecessorKey { - FSTTreeSortedDictionary *map = - [[FSTTreeSortedDictionary alloc] initWithComparator:[self defaultComparator]]; - map = [map dictionaryBySettingObject:@1 forKey:@1]; - map = [map dictionaryBySettingObject:@50 forKey:@50]; - map = [map dictionaryBySettingObject:@3 forKey:@3]; - map = [map dictionaryBySettingObject:@4 forKey:@4]; - map = [map dictionaryBySettingObject:@7 forKey:@7]; - map = [map dictionaryBySettingObject:@9 forKey:@9]; - - XCTAssertNil([map predecessorKey:@1], @"First object doesn't have a predecessor"); - XCTAssertEqualObjects([map predecessorKey:@3], @1, @"@1"); - XCTAssertEqualObjects([map predecessorKey:@4], @3, @"@3"); - XCTAssertEqualObjects([map predecessorKey:@7], @4, @"@4"); - XCTAssertEqualObjects([map predecessorKey:@9], @7, @"@7"); - XCTAssertEqualObjects([map predecessorKey:@50], @9, @"@9"); - XCTAssertThrows([map predecessorKey:@777], @"Expect exception about nonexistent key"); -} - // This is a macro instead of a method so that the failures show on the proper lines. #define ASSERT_ENUMERATOR(enumerator, start, end, step) \ do { \ -- cgit v1.2.3