Skip to content

Commit

Permalink
refactoring state test
Browse files Browse the repository at this point in the history
  • Loading branch information
senghoo committed Apr 6, 2016
1 parent 2f4f567 commit 98efd46
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions 16_state/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@ package state

func ExampleWeek() {
ctx := NewDayContext()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
ctx.Today()
ctx.Next()
todayAndNext := func() {
ctx.Today()
ctx.Next()
}

for i := 0; i < 8; i++ {
todayAndNext()
}
// Output:
// Sunday
// Monday
Expand Down

0 comments on commit 98efd46

Please sign in to comment.