Skip to content

Commit

Permalink
Fixed testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
toomore committed Apr 18, 2015
1 parent e364d09 commit 556d335
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tradingdays/tradingdays_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ package tradingdays
import (
"fmt"
"testing"
"time"

"github.com/toomore/gogrs/utils"
)

func TestIsOpen(t *testing.T) {
fmt.Println(exceptDays)
if IsOpen(2015, 4, 17, time.Local) != true {
if IsOpen(2015, 4, 17, utils.TaipeiTimeZone) != true {
t.Error("Should be `true`")
}
if IsOpen(2015, 4, 18, time.Local) != false {
if IsOpen(2015, 4, 18, utils.TaipeiTimeZone) != false {
t.Error("Should be `false`")
}
if IsOpen(2015, 4, 20, time.Local) != true {
if IsOpen(2015, 4, 20, utils.TaipeiTimeZone) != true {
t.Error("Should be `true`")
}
if IsOpen(2015, 5, 1, time.Local) != false {
if IsOpen(2015, 5, 1, utils.TaipeiTimeZone) != false {
t.Error("Should be `false`")
}
}
Expand Down

0 comments on commit 556d335

Please sign in to comment.