From 3598b86005255bf49ea2a144f83217dc140f7de1 Mon Sep 17 00:00:00 2001 From: Marek Gilbert Date: Mon, 19 Feb 2018 16:16:06 -0800 Subject: [PATCH] Add Firestore_SwiftTests_iOS target to Xcode --- .../Firestore.xcodeproj/project.pbxproj | 160 +++++++++++++++++- .../xcshareddata/xcschemes/AllTests.xcscheme | 10 ++ .../xcschemes/Firestore-Example.xcscheme | 10 ++ .../Firestore_IntegrationTests.xcscheme | 42 ++++- .../xcschemes/Firestore_Tests.xcscheme | 56 +++++- .../Firestore_SwiftTests_iOS.swift | 35 ++++ .../Firestore_SwiftTests_iOS/Info.plist | 22 +++ 7 files changed, 332 insertions(+), 3 deletions(-) create mode 100644 Firestore/Example/Firestore_SwiftTests_iOS/Firestore_SwiftTests_iOS.swift create mode 100644 Firestore/Example/Firestore_SwiftTests_iOS/Info.plist diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index f230cb4a54d..0ed4e0931ba 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ /* Begin PBXBuildFile section */ 3B843E4C1F3A182900548890 /* remote_store_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */; }; + 54269AEC203B9FFC0039F03F /* Firestore_SwiftTests_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54269AEB203B9FFC0039F03F /* Firestore_SwiftTests_iOS.swift */; }; 5436F32420008FAD006E51E3 /* string_printf_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 5436F32320008FAD006E51E3 /* string_printf_test.cc */; }; 54740A571FC914BA00713A1A /* secure_random_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54740A531FC913E500713A1A /* secure_random_test.cc */; }; 54740A581FC914F000713A1A /* autoid_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54740A521FC913E500713A1A /* autoid_test.cc */; }; @@ -171,6 +172,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 54269AEE203B9FFD0039F03F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6003F582195388D10070C39A /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6003F589195388D20070C39A; + remoteInfo = Firestore_Example; + }; 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 6003F582195388D10070C39A /* Project object */; @@ -215,6 +223,9 @@ 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = remote_store_spec_test.json; sourceTree = ""; }; 42491D7DC8C8CD245CC22B93 /* Pods-SwiftBuildTest.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftBuildTest.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftBuildTest/Pods-SwiftBuildTest.debug.xcconfig"; sourceTree = ""; }; 4EBC5F5ABE1FD097EFE5E224 /* Pods-Firestore_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example/Pods-Firestore_Example.release.xcconfig"; sourceTree = ""; }; + 54269AE9203B9FFC0039F03F /* Firestore_SwiftTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_SwiftTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 54269AEB203B9FFC0039F03F /* Firestore_SwiftTests_iOS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Firestore_SwiftTests_iOS.swift; sourceTree = ""; }; + 54269AED203B9FFD0039F03F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5436F32320008FAD006E51E3 /* string_printf_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_printf_test.cc; path = ../../core/test/firebase/firestore/util/string_printf_test.cc; sourceTree = ""; }; 54740A521FC913E500713A1A /* autoid_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = autoid_test.cc; path = ../../core/test/firebase/firestore/util/autoid_test.cc; sourceTree = ""; }; 54740A531FC913E500713A1A /* secure_random_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = secure_random_test.cc; path = ../../core/test/firebase/firestore/util/secure_random_test.cc; sourceTree = ""; }; @@ -384,6 +395,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 54269AE6203B9FFC0039F03F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 6003F587195388D20070C39A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -429,6 +447,15 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 54269AEA203B9FFC0039F03F /* Firestore_SwiftTests_iOS */ = { + isa = PBXGroup; + children = ( + 54269AEB203B9FFC0039F03F /* Firestore_SwiftTests_iOS.swift */, + 54269AED203B9FFD0039F03F /* Info.plist */, + ); + path = Firestore_SwiftTests_iOS; + sourceTree = ""; + }; 54740A561FC913EB00713A1A /* util */ = { isa = PBXGroup; children = ( @@ -474,6 +501,7 @@ 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, 6003F593195388D20070C39A /* Example for Firestore */, 6003F5B5195388D20070C39A /* Tests */, + 54269AEA203B9FFC0039F03F /* Firestore_SwiftTests_iOS */, DE0761E51F2FE611003233AF /* SwiftBuildTest */, 6003F58C195388D20070C39A /* Frameworks */, 6003F58B195388D20070C39A /* Products */, @@ -488,6 +516,7 @@ 6003F5AE195388D20070C39A /* Firestore_Tests.xctest */, DE03B2E91F2149D600A30B9C /* Firestore_IntegrationTests.xctest */, DE0761E41F2FE611003233AF /* SwiftBuildTest.app */, + 54269AE9203B9FFC0039F03F /* Firestore_SwiftTests_iOS.xctest */, ); name = Products; sourceTree = ""; @@ -823,6 +852,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 54269AE8203B9FFC0039F03F /* Firestore_SwiftTests_iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 54269AF2203B9FFD0039F03F /* Build configuration list for PBXNativeTarget "Firestore_SwiftTests_iOS" */; + buildPhases = ( + 54269AE5203B9FFC0039F03F /* Sources */, + 54269AE6203B9FFC0039F03F /* Frameworks */, + 54269AE7203B9FFC0039F03F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 54269AEF203B9FFD0039F03F /* PBXTargetDependency */, + ); + name = Firestore_SwiftTests_iOS; + productName = Firestore_SwiftTests_iOS; + productReference = 54269AE9203B9FFC0039F03F /* Firestore_SwiftTests_iOS.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; 6003F589195388D20070C39A /* Firestore_Example */ = { isa = PBXNativeTarget; buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "Firestore_Example" */; @@ -912,10 +959,15 @@ isa = PBXProject; attributes = { CLASSPREFIX = FIR; - LastSwiftUpdateCheck = 0830; + LastSwiftUpdateCheck = 0920; LastUpgradeCheck = 0720; ORGANIZATIONNAME = Google; TargetAttributes = { + 54269AE8203B9FFC0039F03F = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Automatic; + TestTargetID = 6003F589195388D20070C39A; + }; 6003F5AD195388D20070C39A = { DevelopmentTeam = EQHXZ8M8AV; TestTargetID = 6003F589195388D20070C39A; @@ -952,11 +1004,19 @@ DE03B2941F2149D600A30B9C /* Firestore_IntegrationTests */, DE29E7F51F2174B000909613 /* AllTests */, DE0761E31F2FE611003233AF /* SwiftBuildTest */, + 54269AE8203B9FFC0039F03F /* Firestore_SwiftTests_iOS */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 54269AE7203B9FFC0039F03F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; 6003F588195388D20070C39A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -1255,6 +1315,14 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 54269AE5203B9FFC0039F03F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 54269AEC203B9FFC0039F03F /* Firestore_SwiftTests_iOS.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 6003F586195388D20070C39A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1399,6 +1467,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 54269AEF203B9FFD0039F03F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6003F589195388D20070C39A /* Firestore_Example */; + targetProxy = 54269AEE203B9FFD0039F03F /* PBXContainerItemProxy */; + }; 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 6003F589195388D20070C39A /* Firestore_Example */; @@ -1454,6 +1527,82 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 54269AF0203B9FFD0039F03F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = Firestore_SwiftTests_iOS/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.google.Firestore-SwiftTests-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example.app/Firestore_Example"; + }; + name = Debug; + }; + 54269AF1203B9FFD0039F03F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = Firestore_SwiftTests_iOS/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.google.Firestore-SwiftTests-iOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example.app/Firestore_Example"; + }; + name = Release; + }; 6003F5BD195388D20070C39A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1790,6 +1939,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 54269AF2203B9FFD0039F03F /* Build configuration list for PBXNativeTarget "Firestore_SwiftTests_iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 54269AF0203B9FFD0039F03F /* Debug */, + 54269AF1203B9FFD0039F03F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 6003F585195388D10070C39A /* Build configuration list for PBXProject "Firestore" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme index aacb70e3973..4d927a124d7 100644 --- a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme +++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/AllTests.xcscheme @@ -49,6 +49,16 @@ ReferencedContainer = "container:Firestore.xcodeproj"> + + + + + + + + + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + + + + + + + + @@ -51,6 +73,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -60,6 +91,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Tests.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Tests.xcscheme index 920e1f35466..34965c0eb67 100644 --- a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Tests.xcscheme +++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Tests.xcscheme @@ -7,8 +7,11 @@ buildImplicitDependencies = "YES"> + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + + + + + + + + + + + + @@ -51,6 +87,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> + + + + @@ -60,6 +105,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + + diff --git a/Firestore/Example/Firestore_SwiftTests_iOS/Firestore_SwiftTests_iOS.swift b/Firestore/Example/Firestore_SwiftTests_iOS/Firestore_SwiftTests_iOS.swift new file mode 100644 index 00000000000..6d9116feb9f --- /dev/null +++ b/Firestore/Example/Firestore_SwiftTests_iOS/Firestore_SwiftTests_iOS.swift @@ -0,0 +1,35 @@ +// +// Firestore_SwiftTests_iOS.swift +// Firestore_SwiftTests_iOS +// +// Created by Gil Gilbert on 2/19/18. +// Copyright © 2018 Google. All rights reserved. +// + +import XCTest + +class Firestore_SwiftTests_iOS: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/Firestore/Example/Firestore_SwiftTests_iOS/Info.plist b/Firestore/Example/Firestore_SwiftTests_iOS/Info.plist new file mode 100644 index 00000000000..6c40a6cd0c4 --- /dev/null +++ b/Firestore/Example/Firestore_SwiftTests_iOS/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + +