-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Package.swift and other stuff for linux
- Loading branch information
1 parent
af1cd08
commit 73b3caa
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// swift-tools-version:4.2 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Moxie", | ||
products: [ | ||
.library( | ||
name: "Moxie", | ||
targets: ["Moxie"]), | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target( | ||
name: "Moxie", | ||
dependencies: []), | ||
.testTarget( | ||
name: "MoxieTests", | ||
dependencies: ["Moxie"]), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import XCTest | ||
|
||
import MoxieTests | ||
|
||
var tests = [XCTestCaseEntry]() | ||
tests += MoxieTests.__allTests() | ||
|
||
XCTMain(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import XCTest | ||
|
||
extension ExplainTests { | ||
static let __allTests = [ | ||
("testExplainWithAnInvocation", testExplainWithAnInvocation), | ||
("testExplainWithBothStubbingsAndInvocations", testExplainWithBothStubbingsAndInvocations), | ||
("testExplainWithMultipleInvocations", testExplainWithMultipleInvocations), | ||
("testExplainWithMultipleInvocationsWithTheSameParameters", testExplainWithMultipleInvocationsWithTheSameParameters), | ||
("testExplainWithMultipleStubbings", testExplainWithMultipleStubbings), | ||
("testExplainWithNoStubbingsOrInteractions", testExplainWithNoStubbingsOrInteractions), | ||
("testExplainWithOneStubbing", testExplainWithOneStubbing), | ||
] | ||
} | ||
|
||
extension MockTests { | ||
static let __allTests = [ | ||
("testExplain", testExplain), | ||
("testRecordWithASpecificSetOfParameters", testRecordWithASpecificSetOfParameters), | ||
("testRecordWithNoParameters", testRecordWithNoParameters), | ||
("testStubbingSomething", testStubbingSomething), | ||
("testStubbingWithNoReturnValue", testStubbingWithNoReturnValue), | ||
("testStubbingWithParametersWithAReturnValue", testStubbingWithParametersWithAReturnValue), | ||
("testStubbingWithParametersWithNilReturnValue", testStubbingWithParametersWithNilReturnValue), | ||
("testVerifyReturnsFalseWhenFunctionWasNotCalled", testVerifyReturnsFalseWhenFunctionWasNotCalled), | ||
("testVerifyReturnsTrueWhenCalledWithMatchingParameters", testVerifyReturnsTrueWhenCalledWithMatchingParameters), | ||
("testVerifyReturnsTrueWhenFunctionWasCalled", testVerifyReturnsTrueWhenFunctionWasCalled), | ||
] | ||
} | ||
|
||
extension StubbingTests { | ||
static let __allTests = [ | ||
("testCanStubAFunction", testCanStubAFunction), | ||
("testLastInWins", testLastInWins), | ||
("testSequentialStubbing", testSequentialStubbing), | ||
] | ||
} | ||
|
||
extension VerificationTests { | ||
static let __allTests = [ | ||
("testInvocationCountForMultipleCalls", testInvocationCountForMultipleCalls), | ||
("testInvocationCountForOneCall", testInvocationCountForOneCall), | ||
("testInvocationCountForZeroCalls", testInvocationCountForZeroCalls), | ||
("testVerifyIsFalseIfCallCountWasZero", testVerifyIsFalseIfCallCountWasZero), | ||
("testVerifyIsTrueIfCallCountWasMoreThanOne", testVerifyIsTrueIfCallCountWasMoreThanOne), | ||
("testVerifyIsTrueIfCallCountWasOne", testVerifyIsTrueIfCallCountWasOne), | ||
] | ||
} | ||
|
||
#if !os(macOS) | ||
public func __allTests() -> [XCTestCaseEntry] { | ||
return [ | ||
testCase(ExplainTests.__allTests), | ||
testCase(MockTests.__allTests), | ||
testCase(StubbingTests.__allTests), | ||
testCase(VerificationTests.__allTests), | ||
] | ||
} | ||
#endif |