mirror of
https://github.com/zhigang1992/PerspectiveTransform.git
synced 2026-01-12 22:49:33 +08:00
add workaround for xcode bug incorrectly reporting test coverage
See: http://www.openradar.me/radar?id=5065986117992448
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
4B74DB48203BDAD70030F41B /* ReferenceImages in Resources */ = {isa = PBXBuildFile; fileRef = 4BA7B14D1C7D710D00933779 /* ReferenceImages */; };
|
||||
4B76EDD8205674CF009492EC /* FittingPolygon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B76EDD7205674CF009492EC /* FittingPolygon.swift */; };
|
||||
4B76EDDA205674F3009492EC /* PolygonLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B76EDD9205674F3009492EC /* PolygonLoader.swift */; };
|
||||
4B8C085420C1F415006BFBEF /* WorkaroundForXcodeCompleteCoverageSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B8C085320C1F415006BFBEF /* WorkaroundForXcodeCompleteCoverageSpec.swift */; };
|
||||
4B97C3C92047B9EF004C9782 /* NimbleSpecHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BA3D17C1C771B560009B690 /* NimbleSpecHelper.swift */; };
|
||||
4B97C3CA2047B9F0004C9782 /* NimbleSpecHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BA3D17C1C771B560009B690 /* NimbleSpecHelper.swift */; };
|
||||
4B97C3CB2047BA5F004C9782 /* NimbleSpecHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BA3D17C1C771B560009B690 /* NimbleSpecHelper.swift */; };
|
||||
@@ -92,6 +93,7 @@
|
||||
4B76EDD7205674CF009492EC /* FittingPolygon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FittingPolygon.swift; sourceTree = "<group>"; };
|
||||
4B76EDD9205674F3009492EC /* PolygonLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PolygonLoader.swift; sourceTree = "<group>"; };
|
||||
4B84138A201DD90D00D17FE2 /* PerspectiveSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerspectiveSpec.swift; sourceTree = "<group>"; };
|
||||
4B8C085320C1F415006BFBEF /* WorkaroundForXcodeCompleteCoverageSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkaroundForXcodeCompleteCoverageSpec.swift; sourceTree = "<group>"; };
|
||||
4B97C3CC2047BAC1004C9782 /* AccelerateSolvePerfTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccelerateSolvePerfTest.swift; sourceTree = "<group>"; };
|
||||
4BA3D17A1C771B2E0009B690 /* ProjectionSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = ProjectionSpec.swift; sourceTree = "<group>"; tabWidth = 4; };
|
||||
4BA3D17C1C771B560009B690 /* NimbleSpecHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NimbleSpecHelper.swift; sourceTree = "<group>"; };
|
||||
@@ -183,6 +185,7 @@
|
||||
4B84138A201DD90D00D17FE2 /* PerspectiveSpec.swift */,
|
||||
4B58ECEE1C799C2A00F1BC00 /* BasisVectorSpec.swift */,
|
||||
4BA3D1801C77230A0009B690 /* VectorProjectionSpec.swift */,
|
||||
4B8C085320C1F415006BFBEF /* WorkaroundForXcodeCompleteCoverageSpec.swift */,
|
||||
4B74DB38203BD9C70030F41B /* Info.plist */,
|
||||
);
|
||||
path = Specs;
|
||||
@@ -685,6 +688,7 @@
|
||||
4B74DB40203BDA070030F41B /* ProjectionSpec.swift in Sources */,
|
||||
4B74DB3C203BDA070030F41B /* MatrixSpec.swift in Sources */,
|
||||
4B74DB3F203BDA070030F41B /* CALayerTransformSpec.swift in Sources */,
|
||||
4B8C085420C1F415006BFBEF /* WorkaroundForXcodeCompleteCoverageSpec.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -40,9 +40,18 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
codeCoverageEnabled = "YES">
|
||||
codeCoverageEnabled = "YES"
|
||||
onlyGenerateCoverageForSpecifiedTargets = "YES"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<CodeCoverageTargets>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "6CB0C222AAD7622F2BA8441A2633076A"
|
||||
BuildableName = "PerspectiveTransform.framework"
|
||||
BlueprintName = "PerspectiveTransform"
|
||||
ReferencedContainer = "container:Pods/Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</CodeCoverageTargets>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
@@ -81,7 +90,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
17
Example/Specs/WorkaroundForXcodeCompleteCoverageSpec.swift
Normal file
17
Example/Specs/WorkaroundForXcodeCompleteCoverageSpec.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
import Quick
|
||||
import Nimble
|
||||
@testable import PerspectiveTransform
|
||||
|
||||
class WorkaroundForXcodeCompleteCoverageSpec: QuickSpec {
|
||||
// Workaround for Xcode bug: http://www.openradar.me/radar?id=5065986117992448
|
||||
override func spec() {
|
||||
describe(String(describing: Quadrilateral.init(_:_:))) {
|
||||
context("to workaround Xcode coverage bug we add this silly test in order to maintain 100% test coverage") {
|
||||
it("should be covered by tests") {
|
||||
let optional:Quadrilateral? = Quadrilateral(CGPoint.zero, CGSize.zero)
|
||||
expect(optional).notTo(beNil())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user