Skip to content

Commit 9bd6ecb

Browse files
committed
Added unit tests.
1 parent 3a9be37 commit 9bd6ecb

File tree

5 files changed

+370
-1
lines changed

5 files changed

+370
-1
lines changed

ColorSet.xcodeproj/project.pbxproj

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
0544CBF62273199C004A2499 /* ColorSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0544CBF52273199C004A2499 /* ColorSet.swift */; };
2525
0544CC0D2273466C004A2499 /* ColorSetStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0544CC0C2273466C004A2499 /* ColorSetStream.swift */; };
2626
0564590220E4DDFD001EA86F /* HexColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0564590120E4DDFD001EA86F /* HexColor.swift */; };
27+
057DC44E22B1492200BA6727 /* Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 057DC44D22B1492200BA6727 /* Test.swift */; };
28+
057DC45022B1492200BA6727 /* ColorSetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05CD4ABA20ED7CD100DBDE99 /* ColorSetKit.framework */; };
29+
057DC45822B14CC300BA6727 /* Colors.colorset in Resources */ = {isa = PBXBuildFile; fileRef = 057DC45722B14CC300BA6727 /* Colors.colorset */; };
2730
05CD4AC120ED7CD100DBDE99 /* ColorSetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05CD4ABA20ED7CD100DBDE99 /* ColorSetKit.framework */; };
2831
05CD4AC220ED7CD100DBDE99 /* ColorSetKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 05CD4ABA20ED7CD100DBDE99 /* ColorSetKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2932
05D11EC120E1359C00A621B5 /* ColorComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05D11EC020E1359C00A621B5 /* ColorComponent.swift */; };
@@ -55,6 +58,13 @@
5558
remoteGlobalIDString = 05F82B241EF32EA700EC8A93;
5659
remoteInfo = GitHubUpdates;
5760
};
61+
057DC45122B1492200BA6727 /* PBXContainerItemProxy */ = {
62+
isa = PBXContainerItemProxy;
63+
containerPortal = 0543AE5A20DC33BC00284E99 /* Project object */;
64+
proxyType = 1;
65+
remoteGlobalIDString = 05CD4AB920ED7CD100DBDE99;
66+
remoteInfo = ColorSetKit;
67+
};
5868
05CD4ABF20ED7CD100DBDE99 /* PBXContainerItemProxy */ = {
5969
isa = PBXContainerItemProxy;
6070
containerPortal = 0543AE5A20DC33BC00284E99 /* Project object */;
@@ -141,6 +151,10 @@
141151
0544CBF52273199C004A2499 /* ColorSet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorSet.swift; sourceTree = "<group>"; };
142152
0544CC0C2273466C004A2499 /* ColorSetStream.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorSetStream.swift; sourceTree = "<group>"; };
143153
0564590120E4DDFD001EA86F /* HexColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HexColor.swift; sourceTree = "<group>"; };
154+
057DC44B22B1492200BA6727 /* ColorSetKit-Test.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ColorSetKit-Test.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
155+
057DC44D22B1492200BA6727 /* Test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Test.swift; sourceTree = "<group>"; };
156+
057DC44F22B1492200BA6727 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
157+
057DC45722B14CC300BA6727 /* Colors.colorset */ = {isa = PBXFileReference; lastKnownFileType = file; path = Colors.colorset; sourceTree = "<group>"; };
144158
05CD4AB220ED7B2200DBDE99 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
145159
05CD4ABA20ED7CD100DBDE99 /* ColorSetKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ColorSetKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
146160
05CD4AC620ED7CE000DBDE99 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -161,6 +175,14 @@
161175
);
162176
runOnlyForDeploymentPostprocessing = 0;
163177
};
178+
057DC44822B1492200BA6727 /* Frameworks */ = {
179+
isa = PBXFrameworksBuildPhase;
180+
buildActionMask = 2147483647;
181+
files = (
182+
057DC45022B1492200BA6727 /* ColorSetKit.framework in Frameworks */,
183+
);
184+
runOnlyForDeploymentPostprocessing = 0;
185+
};
164186
05CD4AB720ED7CD100DBDE99 /* Frameworks */ = {
165187
isa = PBXFrameworksBuildPhase;
166188
buildActionMask = 2147483647;
@@ -320,6 +342,7 @@
320342
050911D720E559CF009EF90C /* xcconfig */,
321343
0543AE6420DC33BC00284E99 /* ColorSet */,
322344
0509122720E55CB5009EF90C /* ColorSetKit */,
345+
057DC44C22B1492200BA6727 /* ColorSetKit-Test */,
323346
0543AE6320DC33BC00284E99 /* Products */,
324347
0509121420E55A7F009EF90C /* Frameworks */,
325348
);
@@ -330,6 +353,7 @@
330353
children = (
331354
0543AE6220DC33BC00284E99 /* ColorSet.app */,
332355
05CD4ABA20ED7CD100DBDE99 /* ColorSetKit.framework */,
356+
057DC44B22B1492200BA6727 /* ColorSetKit-Test.xctest */,
333357
);
334358
name = Products;
335359
sourceTree = "<group>";
@@ -377,6 +401,16 @@
377401
path = Interface;
378402
sourceTree = "<group>";
379403
};
404+
057DC44C22B1492200BA6727 /* ColorSetKit-Test */ = {
405+
isa = PBXGroup;
406+
children = (
407+
057DC45722B14CC300BA6727 /* Colors.colorset */,
408+
057DC44D22B1492200BA6727 /* Test.swift */,
409+
057DC44F22B1492200BA6727 /* Info.plist */,
410+
);
411+
path = "ColorSetKit-Test";
412+
sourceTree = "<group>";
413+
};
380414
/* End PBXGroup section */
381415

382416
/* Begin PBXHeadersBuildPhase section */
@@ -411,6 +445,24 @@
411445
productReference = 0543AE6220DC33BC00284E99 /* ColorSet.app */;
412446
productType = "com.apple.product-type.application";
413447
};
448+
057DC44A22B1492200BA6727 /* ColorSetKit-Test */ = {
449+
isa = PBXNativeTarget;
450+
buildConfigurationList = 057DC45622B1492200BA6727 /* Build configuration list for PBXNativeTarget "ColorSetKit-Test" */;
451+
buildPhases = (
452+
057DC44722B1492200BA6727 /* Sources */,
453+
057DC44822B1492200BA6727 /* Frameworks */,
454+
057DC44922B1492200BA6727 /* Resources */,
455+
);
456+
buildRules = (
457+
);
458+
dependencies = (
459+
057DC45222B1492200BA6727 /* PBXTargetDependency */,
460+
);
461+
name = "ColorSetKit-Test";
462+
productName = "ColorSetKit-Test";
463+
productReference = 057DC44B22B1492200BA6727 /* ColorSetKit-Test.xctest */;
464+
productType = "com.apple.product-type.bundle.unit-test";
465+
};
414466
05CD4AB920ED7CD100DBDE99 /* ColorSetKit */ = {
415467
isa = PBXNativeTarget;
416468
buildConfigurationList = 05CD4AC320ED7CD100DBDE99 /* Build configuration list for PBXNativeTarget "ColorSetKit" */;
@@ -435,7 +487,7 @@
435487
0543AE5A20DC33BC00284E99 /* Project object */ = {
436488
isa = PBXProject;
437489
attributes = {
438-
LastSwiftUpdateCheck = 0940;
490+
LastSwiftUpdateCheck = 1020;
439491
LastUpgradeCheck = 0940;
440492
ORGANIZATIONNAME = "XS-Labs";
441493
TargetAttributes = {
@@ -451,6 +503,9 @@
451503
};
452504
};
453505
};
506+
057DC44A22B1492200BA6727 = {
507+
CreatedOnToolsVersion = 10.2.1;
508+
};
454509
05CD4AB920ED7CD100DBDE99 = {
455510
CreatedOnToolsVersion = 10.0;
456511
LastSwiftMigration = 1020;
@@ -478,6 +533,7 @@
478533
targets = (
479534
0543AE6120DC33BC00284E99 /* ColorSet */,
480535
05CD4AB920ED7CD100DBDE99 /* ColorSetKit */,
536+
057DC44A22B1492200BA6727 /* ColorSetKit-Test */,
481537
);
482538
};
483539
/* End PBXProject section */
@@ -512,6 +568,14 @@
512568
);
513569
runOnlyForDeploymentPostprocessing = 0;
514570
};
571+
057DC44922B1492200BA6727 /* Resources */ = {
572+
isa = PBXResourcesBuildPhase;
573+
buildActionMask = 2147483647;
574+
files = (
575+
057DC45822B14CC300BA6727 /* Colors.colorset in Resources */,
576+
);
577+
runOnlyForDeploymentPostprocessing = 0;
578+
};
515579
05CD4AB820ED7CD100DBDE99 /* Resources */ = {
516580
isa = PBXResourcesBuildPhase;
517581
buildActionMask = 2147483647;
@@ -556,6 +620,14 @@
556620
);
557621
runOnlyForDeploymentPostprocessing = 0;
558622
};
623+
057DC44722B1492200BA6727 /* Sources */ = {
624+
isa = PBXSourcesBuildPhase;
625+
buildActionMask = 2147483647;
626+
files = (
627+
057DC44E22B1492200BA6727 /* Test.swift in Sources */,
628+
);
629+
runOnlyForDeploymentPostprocessing = 0;
630+
};
559631
05CD4AB620ED7CD100DBDE99 /* Sources */ = {
560632
isa = PBXSourcesBuildPhase;
561633
buildActionMask = 2147483647;
@@ -575,6 +647,11 @@
575647
name = GitHubUpdates;
576648
targetProxy = 0509121220E55A7B009EF90C /* PBXContainerItemProxy */;
577649
};
650+
057DC45222B1492200BA6727 /* PBXTargetDependency */ = {
651+
isa = PBXTargetDependency;
652+
target = 05CD4AB920ED7CD100DBDE99 /* ColorSetKit */;
653+
targetProxy = 057DC45122B1492200BA6727 /* PBXContainerItemProxy */;
654+
};
578655
05CD4AC020ED7CD100DBDE99 /* PBXTargetDependency */ = {
579656
isa = PBXTargetDependency;
580657
target = 05CD4AB920ED7CD100DBDE99 /* ColorSetKit */;
@@ -666,6 +743,34 @@
666743
};
667744
name = Release;
668745
};
746+
057DC45322B1492200BA6727 /* Debug */ = {
747+
isa = XCBuildConfiguration;
748+
buildSettings = {
749+
INFOPLIST_FILE = "ColorSetKit-Test/Info.plist";
750+
LD_RUNPATH_SEARCH_PATHS = (
751+
"$(inherited)",
752+
"@executable_path/../Frameworks",
753+
"@loader_path/../Frameworks",
754+
);
755+
PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.ColorSetKit-Test";
756+
PRODUCT_NAME = "$(TARGET_NAME)";
757+
};
758+
name = Debug;
759+
};
760+
057DC45422B1492200BA6727 /* Release */ = {
761+
isa = XCBuildConfiguration;
762+
buildSettings = {
763+
INFOPLIST_FILE = "ColorSetKit-Test/Info.plist";
764+
LD_RUNPATH_SEARCH_PATHS = (
765+
"$(inherited)",
766+
"@executable_path/../Frameworks",
767+
"@loader_path/../Frameworks",
768+
);
769+
PRODUCT_BUNDLE_IDENTIFIER = "com.xs-labs.ColorSetKit-Test";
770+
PRODUCT_NAME = "$(TARGET_NAME)";
771+
};
772+
name = Release;
773+
};
669774
05CD4AC420ED7CD100DBDE99 /* Debug */ = {
670775
isa = XCBuildConfiguration;
671776
buildSettings = {
@@ -744,6 +849,15 @@
744849
defaultConfigurationIsVisible = 0;
745850
defaultConfigurationName = Release;
746851
};
852+
057DC45622B1492200BA6727 /* Build configuration list for PBXNativeTarget "ColorSetKit-Test" */ = {
853+
isa = XCConfigurationList;
854+
buildConfigurations = (
855+
057DC45322B1492200BA6727 /* Debug */,
856+
057DC45422B1492200BA6727 /* Release */,
857+
);
858+
defaultConfigurationIsVisible = 0;
859+
defaultConfigurationName = Release;
860+
};
747861
05CD4AC320ED7CD100DBDE99 /* Build configuration list for PBXNativeTarget "ColorSetKit" */ = {
748862
isa = XCConfigurationList;
749863
buildConfigurations = (

ColorSet.xcodeproj/xcshareddata/xcschemes/ColorSetKit.xcscheme

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,26 @@
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "057DC44A22B1492200BA6727"
36+
BuildableName = "ColorSetKit-Test.xctest"
37+
BlueprintName = "ColorSetKit-Test"
38+
ReferencedContainer = "container:ColorSet.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
3141
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "05CD4AB920ED7CD100DBDE99"
46+
BuildableName = "ColorSetKit.framework"
47+
BlueprintName = "ColorSetKit"
48+
ReferencedContainer = "container:ColorSet.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
3251
<AdditionalOptions>
3352
</AdditionalOptions>
3453
</TestAction>

ColorSetKit-Test/Colors.colorset

188 Bytes
Binary file not shown.

ColorSetKit-Test/Info.plist

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
</dict>
22+
</plist>

0 commit comments

Comments
 (0)