Skip to content

Commit dad8415

Browse files
committed
test: configure convex hull tests for travis ci
1 parent a47ddd7 commit dad8415

File tree

5 files changed

+103
-42
lines changed

5 files changed

+103
-42
lines changed

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ script:
2020
- xcodebuild test -project ./Bucket\ Sort/Tests/Tests.xcodeproj -scheme Tests
2121
- xcodebuild test -project ./B-Tree/Tests/Tests.xcodeproj -scheme Tests
2222
- xcodebuild test -project ./Comb\ Sort/Tests/Tests.xcodeproj -scheme Tests
23+
- xcodebuild test -project ./Convex\ Hull/Convex\ Hull.xcodeproj -scheme Tests
2324
- xcodebuild test -project ./Counting\ Sort/Tests/Tests.xcodeproj -scheme Tests
2425
- xcodebuild test -project ./Depth-First\ Search/Tests/Tests.xcodeproj -scheme Tests
2526
- xcodebuild test -project ./Graph/Graph.xcodeproj -scheme GraphTests

Convex Hull/Convex Hull.xcodeproj/project.pbxproj

+39-39
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
1CB614211F893A3800A14493 /* Convex_HullTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CB614201F893A3800A14493 /* Convex_HullTests.swift */; };
11-
1CB614281F893ACA00A14493 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D68CB1E599CF100161780 /* View.swift */; };
10+
1CB614301F89456C00A14493 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CB6142F1F89456C00A14493 /* Tests.swift */; };
11+
1CB614371F8945B300A14493 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D68CB1E599CF100161780 /* View.swift */; };
1212
8E6D68BA1E59989400161780 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D68B91E59989400161780 /* AppDelegate.swift */; };
1313
8E6D68C11E59989400161780 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E6D68C01E59989400161780 /* Assets.xcassets */; };
1414
8E6D68C41E59989400161780 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E6D68C21E59989400161780 /* LaunchScreen.storyboard */; };
1515
8E6D68CC1E599CF100161780 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E6D68CB1E599CF100161780 /* View.swift */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXContainerItemProxy section */
19-
1CB614231F893A3800A14493 /* PBXContainerItemProxy */ = {
19+
1CB614321F89456C00A14493 /* PBXContainerItemProxy */ = {
2020
isa = PBXContainerItemProxy;
2121
containerPortal = 8E6D68AE1E59989400161780 /* Project object */;
2222
proxyType = 1;
@@ -26,9 +26,9 @@
2626
/* End PBXContainerItemProxy section */
2727

2828
/* Begin PBXFileReference section */
29-
1CB6141E1F893A3800A14493 /* Convex HullTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Convex HullTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
30-
1CB614201F893A3800A14493 /* Convex_HullTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Convex_HullTests.swift; sourceTree = "<group>"; };
31-
1CB614221F893A3800A14493 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
29+
1CB6142D1F89456C00A14493 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
30+
1CB6142F1F89456C00A14493 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
31+
1CB614311F89456C00A14493 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3232
8E6D68B61E59989400161780 /* Convex Hull.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Convex Hull.app"; sourceTree = BUILT_PRODUCTS_DIR; };
3333
8E6D68B91E59989400161780 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3434
8E6D68C01E59989400161780 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -38,7 +38,7 @@
3838
/* End PBXFileReference section */
3939

4040
/* Begin PBXFrameworksBuildPhase section */
41-
1CB6141B1F893A3800A14493 /* Frameworks */ = {
41+
1CB6142A1F89456C00A14493 /* Frameworks */ = {
4242
isa = PBXFrameworksBuildPhase;
4343
buildActionMask = 2147483647;
4444
files = (
@@ -55,20 +55,20 @@
5555
/* End PBXFrameworksBuildPhase section */
5656

5757
/* Begin PBXGroup section */
58-
1CB6141F1F893A3800A14493 /* Convex HullTests */ = {
58+
1CB6142E1F89456C00A14493 /* Tests */ = {
5959
isa = PBXGroup;
6060
children = (
61-
1CB614201F893A3800A14493 /* Convex_HullTests.swift */,
62-
1CB614221F893A3800A14493 /* Info.plist */,
61+
1CB6142F1F89456C00A14493 /* Tests.swift */,
62+
1CB614311F89456C00A14493 /* Info.plist */,
6363
);
64-
path = "Convex HullTests";
64+
path = Tests;
6565
sourceTree = "<group>";
6666
};
6767
8E6D68AD1E59989400161780 = {
6868
isa = PBXGroup;
6969
children = (
7070
8E6D68B81E59989400161780 /* Convex Hull */,
71-
1CB6141F1F893A3800A14493 /* Convex HullTests */,
71+
1CB6142E1F89456C00A14493 /* Tests */,
7272
8E6D68B71E59989400161780 /* Products */,
7373
);
7474
sourceTree = "<group>";
@@ -77,7 +77,7 @@
7777
isa = PBXGroup;
7878
children = (
7979
8E6D68B61E59989400161780 /* Convex Hull.app */,
80-
1CB6141E1F893A3800A14493 /* Convex HullTests.xctest */,
80+
1CB6142D1F89456C00A14493 /* Tests.xctest */,
8181
);
8282
name = Products;
8383
sourceTree = "<group>";
@@ -97,22 +97,22 @@
9797
/* End PBXGroup section */
9898

9999
/* Begin PBXNativeTarget section */
100-
1CB6141D1F893A3800A14493 /* Convex HullTests */ = {
100+
1CB6142C1F89456C00A14493 /* Tests */ = {
101101
isa = PBXNativeTarget;
102-
buildConfigurationList = 1CB614271F893A3800A14493 /* Build configuration list for PBXNativeTarget "Convex HullTests" */;
102+
buildConfigurationList = 1CB614341F89456C00A14493 /* Build configuration list for PBXNativeTarget "Tests" */;
103103
buildPhases = (
104-
1CB6141A1F893A3800A14493 /* Sources */,
105-
1CB6141B1F893A3800A14493 /* Frameworks */,
106-
1CB6141C1F893A3800A14493 /* Resources */,
104+
1CB614291F89456C00A14493 /* Sources */,
105+
1CB6142A1F89456C00A14493 /* Frameworks */,
106+
1CB6142B1F89456C00A14493 /* Resources */,
107107
);
108108
buildRules = (
109109
);
110110
dependencies = (
111-
1CB614241F893A3800A14493 /* PBXTargetDependency */,
111+
1CB614331F89456C00A14493 /* PBXTargetDependency */,
112112
);
113-
name = "Convex HullTests";
114-
productName = "Convex HullTests";
115-
productReference = 1CB6141E1F893A3800A14493 /* Convex HullTests.xctest */;
113+
name = Tests;
114+
productName = Tests;
115+
productReference = 1CB6142D1F89456C00A14493 /* Tests.xctest */;
116116
productType = "com.apple.product-type.bundle.unit-test";
117117
};
118118
8E6D68B51E59989400161780 /* Convex Hull */ = {
@@ -142,7 +142,7 @@
142142
LastUpgradeCheck = 0820;
143143
ORGANIZATIONNAME = Workmoose;
144144
TargetAttributes = {
145-
1CB6141D1F893A3800A14493 = {
145+
1CB6142C1F89456C00A14493 = {
146146
CreatedOnToolsVersion = 9.0;
147147
ProvisioningStyle = Automatic;
148148
TestTargetID = 8E6D68B51E59989400161780;
@@ -168,13 +168,13 @@
168168
projectRoot = "";
169169
targets = (
170170
8E6D68B51E59989400161780 /* Convex Hull */,
171-
1CB6141D1F893A3800A14493 /* Convex HullTests */,
171+
1CB6142C1F89456C00A14493 /* Tests */,
172172
);
173173
};
174174
/* End PBXProject section */
175175

176176
/* Begin PBXResourcesBuildPhase section */
177-
1CB6141C1F893A3800A14493 /* Resources */ = {
177+
1CB6142B1F89456C00A14493 /* Resources */ = {
178178
isa = PBXResourcesBuildPhase;
179179
buildActionMask = 2147483647;
180180
files = (
@@ -193,12 +193,12 @@
193193
/* End PBXResourcesBuildPhase section */
194194

195195
/* Begin PBXSourcesBuildPhase section */
196-
1CB6141A1F893A3800A14493 /* Sources */ = {
196+
1CB614291F89456C00A14493 /* Sources */ = {
197197
isa = PBXSourcesBuildPhase;
198198
buildActionMask = 2147483647;
199199
files = (
200-
1CB614281F893ACA00A14493 /* View.swift in Sources */,
201-
1CB614211F893A3800A14493 /* Convex_HullTests.swift in Sources */,
200+
1CB614371F8945B300A14493 /* View.swift in Sources */,
201+
1CB614301F89456C00A14493 /* Tests.swift in Sources */,
202202
);
203203
runOnlyForDeploymentPostprocessing = 0;
204204
};
@@ -214,10 +214,10 @@
214214
/* End PBXSourcesBuildPhase section */
215215

216216
/* Begin PBXTargetDependency section */
217-
1CB614241F893A3800A14493 /* PBXTargetDependency */ = {
217+
1CB614331F89456C00A14493 /* PBXTargetDependency */ = {
218218
isa = PBXTargetDependency;
219219
target = 8E6D68B51E59989400161780 /* Convex Hull */;
220-
targetProxy = 1CB614231F893A3800A14493 /* PBXContainerItemProxy */;
220+
targetProxy = 1CB614321F89456C00A14493 /* PBXContainerItemProxy */;
221221
};
222222
/* End PBXTargetDependency section */
223223

@@ -233,7 +233,7 @@
233233
/* End PBXVariantGroup section */
234234

235235
/* Begin XCBuildConfiguration section */
236-
1CB614251F893A3800A14493 /* Debug */ = {
236+
1CB614351F89456C00A14493 /* Debug */ = {
237237
isa = XCBuildConfiguration;
238238
buildSettings = {
239239
BUNDLE_LOADER = "$(TEST_HOST)";
@@ -249,18 +249,18 @@
249249
CODE_SIGN_IDENTITY = "iPhone Developer";
250250
CODE_SIGN_STYLE = Automatic;
251251
GCC_C_LANGUAGE_STANDARD = gnu11;
252-
INFOPLIST_FILE = "Convex HullTests/Info.plist";
252+
INFOPLIST_FILE = Tests/Info.plist;
253253
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
254254
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
255-
PRODUCT_BUNDLE_IDENTIFIER = "com.mnespor.Convex-HullTests";
255+
PRODUCT_BUNDLE_IDENTIFIER = com.mnespor.Tests;
256256
PRODUCT_NAME = "$(TARGET_NAME)";
257257
SWIFT_VERSION = 4.0;
258258
TARGETED_DEVICE_FAMILY = "1,2";
259259
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Convex Hull.app/Convex Hull";
260260
};
261261
name = Debug;
262262
};
263-
1CB614261F893A3800A14493 /* Release */ = {
263+
1CB614361F89456C00A14493 /* Release */ = {
264264
isa = XCBuildConfiguration;
265265
buildSettings = {
266266
BUNDLE_LOADER = "$(TEST_HOST)";
@@ -276,10 +276,10 @@
276276
CODE_SIGN_IDENTITY = "iPhone Developer";
277277
CODE_SIGN_STYLE = Automatic;
278278
GCC_C_LANGUAGE_STANDARD = gnu11;
279-
INFOPLIST_FILE = "Convex HullTests/Info.plist";
279+
INFOPLIST_FILE = Tests/Info.plist;
280280
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
281281
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
282-
PRODUCT_BUNDLE_IDENTIFIER = "com.mnespor.Convex-HullTests";
282+
PRODUCT_BUNDLE_IDENTIFIER = com.mnespor.Tests;
283283
PRODUCT_NAME = "$(TARGET_NAME)";
284284
SWIFT_VERSION = 4.0;
285285
TARGETED_DEVICE_FAMILY = "1,2";
@@ -409,11 +409,11 @@
409409
/* End XCBuildConfiguration section */
410410

411411
/* Begin XCConfigurationList section */
412-
1CB614271F893A3800A14493 /* Build configuration list for PBXNativeTarget "Convex HullTests" */ = {
412+
1CB614341F89456C00A14493 /* Build configuration list for PBXNativeTarget "Tests" */ = {
413413
isa = XCConfigurationList;
414414
buildConfigurations = (
415-
1CB614251F893A3800A14493 /* Debug */,
416-
1CB614261F893A3800A14493 /* Release */,
415+
1CB614351F89456C00A14493 /* Debug */,
416+
1CB614361F89456C00A14493 /* Release */,
417417
);
418418
defaultConfigurationIsVisible = 0;
419419
defaultConfigurationName = Release;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0900"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
language = ""
14+
shouldUseLaunchSchemeArgsEnv = "YES">
15+
<Testables>
16+
<TestableReference
17+
skipped = "NO">
18+
<BuildableReference
19+
BuildableIdentifier = "primary"
20+
BlueprintIdentifier = "1CB6142C1F89456C00A14493"
21+
BuildableName = "Tests.xctest"
22+
BlueprintName = "Tests"
23+
ReferencedContainer = "container:Convex Hull.xcodeproj">
24+
</BuildableReference>
25+
</TestableReference>
26+
</Testables>
27+
<AdditionalOptions>
28+
</AdditionalOptions>
29+
</TestAction>
30+
<LaunchAction
31+
buildConfiguration = "Debug"
32+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
33+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
34+
language = ""
35+
launchStyle = "0"
36+
useCustomWorkingDirectory = "NO"
37+
ignoresPersistentStateOnLaunch = "NO"
38+
debugDocumentVersioning = "YES"
39+
debugServiceExtension = "internal"
40+
allowLocationSimulation = "YES">
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
</ProfileAction>
51+
<AnalyzeAction
52+
buildConfiguration = "Debug">
53+
</AnalyzeAction>
54+
<ArchiveAction
55+
buildConfiguration = "Release"
56+
revealArchiveInOrganizer = "YES">
57+
</ArchiveAction>
58+
</Scheme>

Convex Hull/Convex HullTests/Convex_HullTests.swift renamed to Convex Hull/Tests/Tests.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
//
2-
// Convex_HullTests.swift
3-
// Convex HullTests
2+
// Tests.swift
3+
// Tests
44
//
55
// Created by Matthew Nespor on 10/7/17.
66
// Copyright © 2017 Workmoose. All rights reserved.
77
//
88

99
import XCTest
1010

11-
class Convex_HullTests: XCTestCase {
11+
class Tests: XCTestCase {
1212
func testHorizontalInitialLine() {
1313
let view = View()
1414
let excludedPoint = CGPoint(x: 146, y: 284)
@@ -18,6 +18,8 @@ class Convex_HullTests: XCTestCase {
1818
CGPoint(x: 157, y: 447),
1919
]
2020

21+
view.points = [CGPoint]()
22+
view.convexHull = [CGPoint]()
2123
view.points.append(contentsOf: includedPoints)
2224
view.points.append(excludedPoint)
2325
view.points.sort { (a: CGPoint, b: CGPoint) -> Bool in

0 commit comments

Comments
 (0)