From 9ba088053d5680ac4720fa488367c745b994d006 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 9 May 2018 20:49:32 -0700 Subject: Add missing tests to the Firestore project (#1254) * Fix order of project elements * Add immutable container tests to the Firestore project * Fix style problems in TransformOperations * Method names should have an initial upper case character (except getters/setters) * Pointers bind to the type not the name in C++ * Fix unsigned/signed comparison warning * Make transform_operations.h Objective-C++ only It turns out that you can't conditionally define virtual methods. This causes multiple versions of the vtable to be emitted and when the linker resolves all the vtable definitions for a class it picks one arbitrarily causing failures for callers that expect some of the conditional methods to be present. * Add precondition_test and field_mask_test to the project * Add field_transform_test and transform_operations_test to the project * Clean up missing newline/excess comments * Use braced initialization to avoid linter false positive on std::transform --- .../Example/Firestore.xcodeproj/project.pbxproj | 50 +++++++++++++++++----- 1 file changed, 40 insertions(+), 10 deletions(-) (limited to 'Firestore/Example/Firestore.xcodeproj/project.pbxproj') diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 26b5562..131771b 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -111,6 +111,13 @@ 5492E0CA2021557E00B64F25 /* FSTWatchChangeTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0C52021557E00B64F25 /* FSTWatchChangeTests.mm */; }; 5495EB032040E90200EBA509 /* CodableGeoPointTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5495EB022040E90200EBA509 /* CodableGeoPointTests.swift */; }; 54995F6F205B6E12004EFFA0 /* leveldb_key_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54995F6E205B6E12004EFFA0 /* leveldb_key_test.cc */; }; + 549CCA5020A36DBC00BCEB75 /* sorted_set_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA4C20A36DBB00BCEB75 /* sorted_set_test.cc */; }; + 549CCA5120A36DBC00BCEB75 /* tree_sorted_map_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA4D20A36DBB00BCEB75 /* tree_sorted_map_test.cc */; }; + 549CCA5220A36DBC00BCEB75 /* sorted_map_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA4E20A36DBB00BCEB75 /* sorted_map_test.cc */; }; + 549CCA5720A36E1F00BCEB75 /* field_mask_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA5320A36E1F00BCEB75 /* field_mask_test.cc */; }; + 549CCA5920A36E1F00BCEB75 /* precondition_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 549CCA5520A36E1F00BCEB75 /* precondition_test.cc */; }; + 54A0352620A3AED0003E0143 /* field_transform_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352320A3AEC3003E0143 /* field_transform_test.mm */; }; + 54A0352720A3AED0003E0143 /* transform_operations_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 54A0352220A3AEC3003E0143 /* transform_operations_test.mm */; }; 54C2294F1FECABAE007D065B /* log_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54C2294E1FECABAE007D065B /* log_test.cc */; }; 54DA12A61F315EE100DD57A1 /* collection_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 54DA129C1F315EE100DD57A1 /* collection_spec_test.json */; }; 54DA12A71F315EE100DD57A1 /* existence_filter_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 54DA129D1F315EE100DD57A1 /* existence_filter_spec_test.json */; }; @@ -338,6 +345,14 @@ 5492E0C52021557E00B64F25 /* FSTWatchChangeTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTWatchChangeTests.mm; sourceTree = ""; }; 5495EB022040E90200EBA509 /* CodableGeoPointTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodableGeoPointTests.swift; sourceTree = ""; }; 54995F6E205B6E12004EFFA0 /* leveldb_key_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = leveldb_key_test.cc; sourceTree = ""; }; + 549CCA4C20A36DBB00BCEB75 /* sorted_set_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sorted_set_test.cc; sourceTree = ""; }; + 549CCA4D20A36DBB00BCEB75 /* tree_sorted_map_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tree_sorted_map_test.cc; sourceTree = ""; }; + 549CCA4E20A36DBB00BCEB75 /* sorted_map_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sorted_map_test.cc; sourceTree = ""; }; + 549CCA4F20A36DBC00BCEB75 /* testing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testing.h; sourceTree = ""; }; + 549CCA5320A36E1F00BCEB75 /* field_mask_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = field_mask_test.cc; sourceTree = ""; }; + 549CCA5520A36E1F00BCEB75 /* precondition_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = precondition_test.cc; sourceTree = ""; }; + 54A0352220A3AEC3003E0143 /* transform_operations_test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = transform_operations_test.mm; sourceTree = ""; }; + 54A0352320A3AEC3003E0143 /* field_transform_test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = field_transform_test.mm; sourceTree = ""; }; 54C2294E1FECABAE007D065B /* log_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = log_test.cc; sourceTree = ""; }; 54C9EDF12040E16300A969CD /* Firestore_SwiftTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_SwiftTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54C9EDF52040E16300A969CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -519,19 +534,19 @@ 54740A561FC913EB00713A1A /* util */ = { isa = PBXGroup; children = ( - B6FB4686208F9B9100554BA2 /* async_tests_util.h */, - B6FB4689208F9B9100554BA2 /* executor_libdispatch_test.mm */, - B6FB4687208F9B9100554BA2 /* executor_std_test.cc */, - B6FB4688208F9B9100554BA2 /* executor_test.cc */, - B6FB468A208F9B9100554BA2 /* executor_test.h */, + 548DB926200D590300E00ABC /* assert_test.cc */, B6FB4680208EA0BE00554BA2 /* async_queue_libdispatch_test.mm */, B6FB4681208EA0BE00554BA2 /* async_queue_std_test.cc */, B6FB467B208E9A8200554BA2 /* async_queue_test.cc */, B6FB467A208E9A8200554BA2 /* async_queue_test.h */, - 548DB926200D590300E00ABC /* assert_test.cc */, + B6FB4686208F9B9100554BA2 /* async_tests_util.h */, 54740A521FC913E500713A1A /* autoid_test.cc */, AB380D01201BC69F00D97691 /* bits_test.cc */, 548DB928200D59F600E00ABC /* comparison_test.cc */, + B6FB4689208F9B9100554BA2 /* executor_libdispatch_test.mm */, + B6FB4687208F9B9100554BA2 /* executor_std_test.cc */, + B6FB4688208F9B9100554BA2 /* executor_test.cc */, + B6FB468A208F9B9100554BA2 /* executor_test.h */, 54511E8D209805F8005BD28F /* hashing_test.cc */, 54C2294E1FECABAE007D065B /* log_test.cc */, AB380D03201BC6E400D97691 /* ordered_code_test.cc */, @@ -545,12 +560,12 @@ 54764FAC1FAA0C390085E60A /* GoogleTests */ = { isa = PBXGroup; children = ( - 546854A720A3681B004BDBD5 /* remote */, AB38D9312023962A000A432D /* auth */, AB380CF7201937B800D97691 /* core */, 54EB764B202277970088B8F3 /* immutable */, 54995F70205B6E1A004EFFA0 /* local */, AB356EF5200E9D1A0089B766 /* model */, + 546854A720A3681B004BDBD5 /* remote */, 5467FB05203E652F009C9584 /* testutil */, 54740A561FC913EB00713A1A /* util */, 54764FAE1FAA21B90085E60A /* FSTGoogleTestTests.mm */, @@ -591,6 +606,10 @@ isa = PBXGroup; children = ( 54EB764C202277B30088B8F3 /* array_sorted_map_test.cc */, + 549CCA4E20A36DBB00BCEB75 /* sorted_map_test.cc */, + 549CCA4C20A36DBB00BCEB75 /* sorted_set_test.cc */, + 549CCA4F20A36DBC00BCEB75 /* testing.h */, + 549CCA4D20A36DBB00BCEB75 /* tree_sorted_map_test.cc */, ); path = immutable; sourceTree = ""; @@ -735,14 +754,16 @@ AB356EF5200E9D1A0089B766 /* model */ = { isa = PBXGroup; children = ( + AB71064B201FA60300344F18 /* database_id_test.cc */, B6152AD5202A5385000E5744 /* document_key_test.cc */, AB6B908320322E4D00CC290A /* document_test.cc */, - B686F2B02024FFD70028D6BE /* resource_path_test.cc */, + 549CCA5320A36E1F00BCEB75 /* field_mask_test.cc */, B686F2AD2023DDB20028D6BE /* field_path_test.cc */, - AB71064B201FA60300344F18 /* database_id_test.cc */, AB356EF6200EA5EB0089B766 /* field_value_test.cc */, AB6B908520322E6D00CC290A /* maybe_document_test.cc */, AB6B908720322E8800CC290A /* no_document_test.cc */, + 549CCA5520A36E1F00BCEB75 /* precondition_test.cc */, + B686F2B02024FFD70028D6BE /* resource_path_test.cc */, ABA495B9202B7E79008A7851 /* snapshot_version_test.cc */, ); path = model; @@ -751,8 +772,8 @@ AB380CF7201937B800D97691 /* core */ = { isa = PBXGroup; children = ( - AB380CF82019382300D97691 /* target_id_generator_test.cc */, AB38D92E20235D22000A432D /* database_info_test.cc */, + AB380CF82019382300D97691 /* target_id_generator_test.cc */, ); path = core; sourceTree = ""; @@ -826,11 +847,13 @@ DE51B17B1F0D48AC0013853F /* Model */ = { isa = PBXGroup; children = ( + 54A0352320A3AEC3003E0143 /* field_transform_test.mm */, 5492E0B22021555000B64F25 /* FSTDocumentKeyTests.mm */, 5492E0B32021555100B64F25 /* FSTDocumentSetTests.mm */, 5492E0B62021555100B64F25 /* FSTDocumentTests.mm */, 5492E0B82021555100B64F25 /* FSTFieldValueTests.mm */, 5492E0B72021555100B64F25 /* FSTMutationTests.mm */, + 54A0352220A3AEC3003E0143 /* transform_operations_test.mm */, ); path = Model; sourceTree = ""; @@ -1445,6 +1468,7 @@ DE2EF0881F3D0B6E003D0CDC /* FSTTreeSortedDictionaryTests.m in Sources */, ABE6637A201FA81900ED349A /* database_id_test.cc in Sources */, 5492E0AF2021552D00B64F25 /* FSTReferenceSetTests.mm in Sources */, + 549CCA5120A36DBC00BCEB75 /* tree_sorted_map_test.cc in Sources */, 5492E09E2021552D00B64F25 /* FSTEagerGarbageCollectorTests.mm in Sources */, 5492E0C62021557E00B64F25 /* FSTWatchChange+Testing.mm in Sources */, 5492E064202154B900B64F25 /* FSTQueryListenerTests.mm in Sources */, @@ -1459,6 +1483,7 @@ 5492E058202154AB00B64F25 /* FSTAPIHelpers.mm in Sources */, AB380CFB2019388600D97691 /* target_id_generator_test.cc in Sources */, 5492E0A82021552D00B64F25 /* FSTLevelDBLocalStoreTests.mm in Sources */, + 549CCA5920A36E1F00BCEB75 /* precondition_test.cc in Sources */, ABC1D7DE2023A05300BA84F0 /* user_test.cc in Sources */, 5491BC721FB44593008B3588 /* FSTIntegrationTestCase.mm in Sources */, ABC1D7DD2023A04F00BA84F0 /* empty_credentials_provider_test.cc in Sources */, @@ -1478,8 +1503,10 @@ 5436F32420008FAD006E51E3 /* string_printf_test.cc in Sources */, 5492E067202154B900B64F25 /* FSTEventManagerTests.mm in Sources */, 5492E0BF2021555100B64F25 /* FSTFieldValueTests.mm in Sources */, + 54A0352620A3AED0003E0143 /* field_transform_test.mm in Sources */, 5492E055202154AB00B64F25 /* FIRDocumentSnapshotTests.mm in Sources */, 5492E03E2021401F00B64F25 /* FSTEventAccumulator.mm in Sources */, + 54A0352720A3AED0003E0143 /* transform_operations_test.mm in Sources */, DE2EF0851F3D0B6E003D0CDC /* FSTArraySortedDictionaryTests.m in Sources */, 5492E0AA2021552D00B64F25 /* FSTLevelDBRemoteDocumentCacheTests.mm in Sources */, 5492E0AC2021552D00B64F25 /* FSTMutationQueueTests.mm in Sources */, @@ -1515,6 +1542,7 @@ 54764FAF1FAA21B90085E60A /* FSTGoogleTestTests.mm in Sources */, AB380D04201BC6E400D97691 /* ordered_code_test.cc in Sources */, 5492E03F2021401F00B64F25 /* FSTHelpers.mm in Sources */, + 549CCA5220A36DBC00BCEB75 /* sorted_map_test.cc in Sources */, 5492E068202154B900B64F25 /* FSTQueryTests.mm in Sources */, 5492E0AB2021552D00B64F25 /* StringViewTests.mm in Sources */, 5492E0C92021557E00B64F25 /* FSTRemoteEventTests.mm in Sources */, @@ -1532,6 +1560,7 @@ 5492E03420213FFC00B64F25 /* FSTMemorySpecTests.mm in Sources */, AB380D02201BC69F00D97691 /* bits_test.cc in Sources */, 548DB929200D59F600E00ABC /* comparison_test.cc in Sources */, + 549CCA5720A36E1F00BCEB75 /* field_mask_test.cc in Sources */, 5492E03D2021401F00B64F25 /* FSTAssertTests.mm in Sources */, AB38D93020236E21000A432D /* database_info_test.cc in Sources */, 5492E052202154AB00B64F25 /* FIRGeoPointTests.mm in Sources */, @@ -1540,6 +1569,7 @@ 5492E03520213FFC00B64F25 /* FSTSpecTests.mm in Sources */, 5492E057202154AB00B64F25 /* FIRSnapshotMetadataTests.mm in Sources */, 54740A571FC914BA00713A1A /* secure_random_test.cc in Sources */, + 549CCA5020A36DBC00BCEB75 /* sorted_set_test.cc in Sources */, 5492E0BE2021555100B64F25 /* FSTMutationTests.mm in Sources */, 132E3E53179DE287D875F3F2 /* FSTLevelDBTransactionTests.mm in Sources */, ); -- cgit v1.2.3