ds_saxo_test.go 486 B

123456789101112131415161718192021222324252627
  1. // +build linux
  2. // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
  3. package tick
  4. import (
  5. "log"
  6. //"market"
  7. "testing"
  8. )
  9. func TestSaxo(t *testing.T) {
  10. conf := &DsConf{
  11. CfgFile: "saxo-mk.cfg",
  12. SymbolsFile: "saxo-symbols.csv",
  13. }
  14. ds, err := newSaxoDS(conf)
  15. if err != nil {
  16. t.Fatal(err)
  17. }
  18. go ds.Run()
  19. chmk := ds.GetMarket()
  20. for mk := range chmk {
  21. log.Println(getTime(mk.Timestamp), mk.InsId)
  22. }
  23. log.Println("@@@@@@@:go here")
  24. }