Improve Code Coverage
This commit is contained in:
parent
2b32ac3de5
commit
3b64fd0049
|
@ -11,6 +11,7 @@
|
|||
CE483C0F1BF5E08A00979C2A /* SplitflapDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE483C0E1BF5E08A00979C2A /* SplitflapDelegateTests.swift */; };
|
||||
CE483C111BF5F0D300979C2A /* TileViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE483C101BF5F0D300979C2A /* TileViewTests.swift */; };
|
||||
CE483C131BF5F0DD00979C2A /* FlapViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE483C121BF5F0DD00979C2A /* FlapViewTests.swift */; };
|
||||
CE5040551C03B99D007D9E9F /* StoryboardTests.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE5040541C03B99D007D9E9F /* StoryboardTests.storyboard */; };
|
||||
CE525D7A1BF331D100429200 /* SplitflapDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE525D791BF331D100429200 /* SplitflapDataSource.swift */; };
|
||||
CE525D7C1BF336EA00429200 /* SplitflapDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE525D7B1BF336EA00429200 /* SplitflapDelegate.swift */; };
|
||||
CE525D7E1BF340BB00429200 /* SplitflapTokens.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE525D7D1BF340BB00429200 /* SplitflapTokens.swift */; };
|
||||
|
@ -88,6 +89,7 @@
|
|||
CE483C0E1BF5E08A00979C2A /* SplitflapDelegateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplitflapDelegateTests.swift; sourceTree = "<group>"; };
|
||||
CE483C101BF5F0D300979C2A /* TileViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TileViewTests.swift; sourceTree = "<group>"; };
|
||||
CE483C121BF5F0DD00979C2A /* FlapViewTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlapViewTests.swift; sourceTree = "<group>"; };
|
||||
CE5040541C03B99D007D9E9F /* StoryboardTests.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = StoryboardTests.storyboard; sourceTree = "<group>"; };
|
||||
CE525D791BF331D100429200 /* SplitflapDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplitflapDataSource.swift; sourceTree = "<group>"; };
|
||||
CE525D7B1BF336EA00429200 /* SplitflapDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplitflapDelegate.swift; sourceTree = "<group>"; };
|
||||
CE525D7D1BF340BB00429200 /* SplitflapTokens.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplitflapTokens.swift; sourceTree = "<group>"; };
|
||||
|
@ -162,6 +164,7 @@
|
|||
CE525DB71BF4FBE400429200 /* TokenGeneratorTests.swift */,
|
||||
CE525DC21BF5134D00429200 /* TokenParserTests.swift */,
|
||||
CEECB4E01BF5D843002511E0 /* XCTTestCaseTemplate.swift */,
|
||||
CE5040541C03B99D007D9E9F /* StoryboardTests.storyboard */,
|
||||
);
|
||||
path = SplitflapTests;
|
||||
sourceTree = "<group>";
|
||||
|
@ -339,6 +342,7 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CE5040551C03B99D007D9E9F /* StoryboardTests.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
@ -28,5 +28,12 @@ import UIKit
|
|||
import XCTest
|
||||
|
||||
class FlapViewTests: XCTTestCaseTemplate {
|
||||
func testInitWithCoder() {
|
||||
let storyboard = UIStoryboard(name: "StoryboardTests", bundle: NSBundle(forClass: self.dynamicType))
|
||||
|
||||
let vc = storyboard.instantiateInitialViewController()
|
||||
|
||||
XCTAssertNotNil(vc)
|
||||
XCTAssertEqual(vc?.view.subviews.count, 4)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="WBJ-ss-Ukp">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hB4-ry-QAy">
|
||||
<objects>
|
||||
<viewController id="WBJ-ss-Ukp" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="btz-nZ-tvc"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wkz-oL-smS"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="fKY-u9-UBW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="RAs-3Z-taw" customClass="FlapView" customModule="SplitflapTests" customModuleProvider="target">
|
||||
<rect key="frame" x="25" y="56" width="240" height="128"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Nbd-mN-Pif" customClass="TileView" customModule="SplitflapTests" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="290" width="240" height="128"/>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<animations/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="FHo-fL-mQr" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="297" y="354"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -28,5 +28,5 @@ import UIKit
|
|||
import XCTest
|
||||
|
||||
class TileViewTests: XCTTestCaseTemplate {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ final class TileView: UIView {
|
|||
required init?(coder aDecoder: NSCoder) {
|
||||
cornerRadii = CGSizeMake(0, 0)
|
||||
position = .Top
|
||||
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue