Skip to content

Commit

Permalink
Merge pull request #4 from zattoo/test
Browse files Browse the repository at this point in the history
Unit testing
  • Loading branch information
dcordero committed Aug 15, 2018
2 parents 4521396 + f30729e commit 3500fca
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
language: objective-c
osx_image: xcode8.3
matrix:
include:
- os: osx
osx_image: xcode9.2
env: DEVICE="Apple TV 4K"
- os: osx
osx_image: xcode9.2
env: DEVICE="Apple TV"
script:
- swiftlint
- xcodebuild test -project TvOSSlider.xcodeproj -scheme TvOSSlider -destination "platform=tvOS Simulator,name=$DEVICE,OS=11.2"
126 changes: 126 additions & 0 deletions TvOSSlider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,29 @@
FF2D4C3C210606D3002A8032 /* TvOSSlider.h in Headers */ = {isa = PBXBuildFile; fileRef = FF2D4C3A210606D3002A8032 /* TvOSSlider.h */; settings = {ATTRIBUTES = (Public, ); }; };
FF2D4C68210607AB002A8032 /* TvOSSlider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2D4C67210607AB002A8032 /* TvOSSlider.swift */; };
FF2D4C6A210607D8002A8032 /* DPadState.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF2D4C69210607D8002A8032 /* DPadState.swift */; };
FF47DDEB2123F06300ABA204 /* TvOSSliderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF47DDEA2123F06300ABA204 /* TvOSSliderTests.swift */; };
FF47DDED2123F06300ABA204 /* TvOSSlider.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF2D4C37210606D3002A8032 /* TvOSSlider.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
FF47DDEE2123F06300ABA204 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = FF2D4C2E210606D3002A8032 /* Project object */;
proxyType = 1;
remoteGlobalIDString = FF2D4C36210606D3002A8032;
remoteInfo = TvOSSlider;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
FF2D4C37210606D3002A8032 /* TvOSSlider.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TvOSSlider.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FF2D4C3A210606D3002A8032 /* TvOSSlider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TvOSSlider.h; sourceTree = "<group>"; };
FF2D4C3B210606D3002A8032 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
FF2D4C67210607AB002A8032 /* TvOSSlider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TvOSSlider.swift; sourceTree = "<group>"; };
FF2D4C69210607D8002A8032 /* DPadState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DPadState.swift; sourceTree = "<group>"; };
FF47DDE82123F06300ABA204 /* TvOSSliderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TvOSSliderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
FF47DDEA2123F06300ABA204 /* TvOSSliderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TvOSSliderTests.swift; sourceTree = "<group>"; };
FF47DDEC2123F06300ABA204 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -28,13 +43,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FF47DDE52123F06300ABA204 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FF47DDED2123F06300ABA204 /* TvOSSlider.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
FF2D4C2D210606D3002A8032 = {
isa = PBXGroup;
children = (
FF2D4C39210606D3002A8032 /* TvOSSlider */,
FF47DDE92123F06300ABA204 /* TvOSSliderTests */,
FF2D4C38210606D3002A8032 /* Products */,
);
sourceTree = "<group>";
Expand All @@ -43,6 +67,7 @@
isa = PBXGroup;
children = (
FF2D4C37210606D3002A8032 /* TvOSSlider.framework */,
FF47DDE82123F06300ABA204 /* TvOSSliderTests.xctest */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -58,6 +83,15 @@
path = TvOSSlider;
sourceTree = "<group>";
};
FF47DDE92123F06300ABA204 /* TvOSSliderTests */ = {
isa = PBXGroup;
children = (
FF47DDEA2123F06300ABA204 /* TvOSSliderTests.swift */,
FF47DDEC2123F06300ABA204 /* Info.plist */,
);
path = TvOSSliderTests;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -90,19 +124,41 @@
productReference = FF2D4C37210606D3002A8032 /* TvOSSlider.framework */;
productType = "com.apple.product-type.framework";
};
FF47DDE72123F06300ABA204 /* TvOSSliderTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = FF47DDF22123F06300ABA204 /* Build configuration list for PBXNativeTarget "TvOSSliderTests" */;
buildPhases = (
FF47DDE42123F06300ABA204 /* Sources */,
FF47DDE52123F06300ABA204 /* Frameworks */,
FF47DDE62123F06300ABA204 /* Resources */,
);
buildRules = (
);
dependencies = (
FF47DDEF2123F06300ABA204 /* PBXTargetDependency */,
);
name = TvOSSliderTests;
productName = TvOSSliderTests;
productReference = FF47DDE82123F06300ABA204 /* TvOSSliderTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
FF2D4C2E210606D3002A8032 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0940;
LastUpgradeCheck = 1000;
ORGANIZATIONNAME = "David Cordero";
TargetAttributes = {
FF2D4C36210606D3002A8032 = {
CreatedOnToolsVersion = 10.0;
LastSwiftMigration = 1000;
};
FF47DDE72123F06300ABA204 = {
CreatedOnToolsVersion = 9.4.1;
};
};
};
buildConfigurationList = FF2D4C31210606D3002A8032 /* Build configuration list for PBXProject "TvOSSlider" */;
Expand All @@ -118,6 +174,7 @@
projectRoot = "";
targets = (
FF2D4C36210606D3002A8032 /* TvOSSlider */,
FF47DDE72123F06300ABA204 /* TvOSSliderTests */,
);
};
/* End PBXProject section */
Expand All @@ -130,6 +187,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FF47DDE62123F06300ABA204 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -142,8 +206,24 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FF47DDE42123F06300ABA204 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FF47DDEB2123F06300ABA204 /* TvOSSliderTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
FF47DDEF2123F06300ABA204 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = FF2D4C36210606D3002A8032 /* TvOSSlider */;
targetProxy = FF47DDEE2123F06300ABA204 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
FF2D4C3D210606D3002A8032 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down Expand Up @@ -318,6 +398,43 @@
};
name = Release;
};
FF47DDF02123F06300ABA204 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = TvOSSliderTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.dcodero.TvOSSliderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.4;
};
name = Debug;
};
FF47DDF12123F06300ABA204 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = TvOSSliderTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.dcodero.TvOSSliderTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 11.4;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand All @@ -339,6 +456,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
FF47DDF22123F06300ABA204 /* Build configuration list for PBXNativeTarget "TvOSSliderTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
FF47DDF02123F06300ABA204 /* Debug */,
FF47DDF12123F06300ABA204 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = FF2D4C2E210606D3002A8032 /* Project object */;
Expand Down
99 changes: 99 additions & 0 deletions TvOSSlider.xcodeproj/xcshareddata/xcschemes/TvOSSlider.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0940"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF2D4C36210606D3002A8032"
BuildableName = "TvOSSlider.framework"
BlueprintName = "TvOSSlider"
ReferencedContainer = "container:TvOSSlider.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF47DDE72123F06300ABA204"
BuildableName = "TvOSSliderTests.xctest"
BlueprintName = "TvOSSliderTests"
ReferencedContainer = "container:TvOSSlider.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF2D4C36210606D3002A8032"
BuildableName = "TvOSSlider.framework"
BlueprintName = "TvOSSlider"
ReferencedContainer = "container:TvOSSlider.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF2D4C36210606D3002A8032"
BuildableName = "TvOSSlider.framework"
BlueprintName = "TvOSSlider"
ReferencedContainer = "container:TvOSSlider.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FF2D4C36210606D3002A8032"
BuildableName = "TvOSSlider.framework"
BlueprintName = "TvOSSlider"
ReferencedContainer = "container:TvOSSlider.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
22 changes: 22 additions & 0 deletions TvOSSliderTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

0 comments on commit 3500fca

Please sign in to comment.