Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
cc6bc8f
[Test] Add FrogcjnTest (event + associated value).
inamiy Nov 1, 2015
ef07416
Refactor code for better typing, naming, and routeMapping support.
inamiy Nov 14, 2015
465146a
[Test] Remove unnecessary `case Any`.
inamiy Nov 14, 2015
da9b9b4
Remove unnecessary methods.
inamiy Nov 24, 2015
c9f6db9
Add comment.
inamiy Nov 24, 2015
32630e2
Rename `Mapping` to `RouteMapping`.
inamiy Nov 24, 2015
93f184b
[Test] Organize tests.
inamiy Nov 24, 2015
bfd9ed2
Remove verbose methods in `Transition` & `Route`.
inamiy Nov 24, 2015
439d5a8
Organize code.
inamiy Nov 28, 2015
12cb3b8
[Test] Add testHasRoute_anyEvent()
inamiy Nov 28, 2015
2eeff1f
Add `final` modifiers.
inamiy Nov 28, 2015
1be6782
[Test] Re-add HierarchicalMachineTests which was deleted in ef07416.
inamiy Nov 29, 2015
8e093da
Update README.md & BasicTests.
inamiy Nov 30, 2015
2986012
Resize logo.png
inamiy Nov 30, 2015
f7ce748
Refactor code by separating event-only-driven `Machine` and `StateMac…
inamiy Dec 5, 2015
8ade68e
[Test] Add more RouteMapping tests.
inamiy Dec 5, 2015
e9c1bf3
[Test] Improve 8ade68e & update README.md
inamiy Dec 5, 2015
c1c18ec
Add `addStateRouteMapping()` & rename `EventRouteMapping` to `RouteMa…
inamiy Dec 7, 2015
b42ac6d
Update README.md
inamiy Dec 7, 2015
4c15f86
Conform State<S> & Event<E> to RawRepresentable.
inamiy Dec 8, 2015
edc0f3e
Set codeCoverageEnabled=YES.
inamiy Dec 8, 2015
2c9844f
[Test] Add StateTests & EventTests.
inamiy Dec 8, 2015
ce2ef2a
Fix RouteMapping + handler.
inamiy Dec 8, 2015
56b8c76
Simplify `machine.addRoutes()`.
inamiy Dec 8, 2015
e49b1c6
[Test] Improve code coverage.
inamiy Dec 8, 2015
c1751bf
Create universal framework to support watchOS & tvOS by using xcconfigs.
inamiy Dec 8, 2015
c6b59e4
Merge pull request #38 from ReactKit/universal-framework
inamiy Dec 8, 2015
83af536
Remove unnecessary xcodeproj settings.
inamiy Dec 9, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Test] Organize tests.
  • Loading branch information
inamiy committed Nov 24, 2015
commit 93f184bf6588df32eb0574385500a994cf1fd8ba
96 changes: 42 additions & 54 deletions SwiftState.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions SwiftStateTests/BasicTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BasicTests: _TestCase
{
func testREADME()
{
let machine = Machine<MyState, MyEvent>(state: .State0) { machine in
let machine = Machine<MyState, NoEvent>(state: .State0) { machine in

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

func testREADME_string()
{
let machine = Machine<String, String>(state: ".State0") { machine in
let machine = Machine<String, NoEvent>(state: ".State0") { machine in

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

// tryState 0 => 1 => 2 => 1 => 0
// tryState 0 => 1 => 2 => 1 => 0

machine <- ".State1"
XCTAssertTrue(machine.state == ".State1")
Expand All @@ -83,9 +83,7 @@ class BasicTests: _TestCase
print("machine.state = \(machine.state)")
}




// StateType + associated value
func testREADME_MyState2()
{
let machine = Machine<MyState2, MyEvent2>(state: .State0("0")) { machine in
Expand Down Expand Up @@ -122,10 +120,6 @@ class BasicTests: _TestCase
print("machine.state = \(machine.state)")
}





func testExample()
{
let machine = Machine<MyState, NoEvent>(state: .State0) {
Expand Down
26 changes: 0 additions & 26 deletions SwiftStateTests/BugFixTests.swift

This file was deleted.

Loading