Skip to content

Commit 93f184b

Browse files
committed
[Test] Organize tests.
1 parent 32630e2 commit 93f184b

11 files changed

+453
-496
lines changed

SwiftState.xcodeproj/project.pbxproj

Lines changed: 42 additions & 54 deletions
Large diffs are not rendered by default.

SwiftStateTests/BasicTests.swift

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class BasicTests: _TestCase
1313
{
1414
func testREADME()
1515
{
16-
let machine = Machine<MyState, MyEvent>(state: .State0) { machine in
16+
let machine = Machine<MyState, NoEvent>(state: .State0) { machine in
1717

1818
machine.addRoute(.State0 => .State1)
1919
machine.addRoute(.Any => .State2) { context in print("Any => 2, msg=\(context.userInfo)") }
@@ -49,7 +49,7 @@ class BasicTests: _TestCase
4949

5050
func testREADME_string()
5151
{
52-
let machine = Machine<String, String>(state: ".State0") { machine in
52+
let machine = Machine<String, NoEvent>(state: ".State0") { machine in
5353

5454
machine.addRoute(".State0" => ".State1")
5555
machine.addRoute(.Any => ".State2") { context in print("Any => 2, msg=\(context.userInfo)") }
@@ -66,7 +66,7 @@ class BasicTests: _TestCase
6666
}
6767
}
6868

69-
// tryState 0 => 1 => 2 => 1 => 0
69+
// tryState 0 => 1 => 2 => 1 => 0
7070

7171
machine <- ".State1"
7272
XCTAssertTrue(machine.state == ".State1")
@@ -83,9 +83,7 @@ class BasicTests: _TestCase
8383
print("machine.state = \(machine.state)")
8484
}
8585

86-
87-
88-
86+
// StateType + associated value
8987
func testREADME_MyState2()
9088
{
9189
let machine = Machine<MyState2, MyEvent2>(state: .State0("0")) { machine in
@@ -122,10 +120,6 @@ class BasicTests: _TestCase
122120
print("machine.state = \(machine.state)")
123121
}
124122

125-
126-
127-
128-
129123
func testExample()
130124
{
131125
let machine = Machine<MyState, NoEvent>(state: .State0) {

SwiftStateTests/BugFixTests.swift

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)