ds_sina_future_test.go 545 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved.
  2. package tick
  3. import (
  4. "log"
  5. //"market"
  6. "testing"
  7. )
  8. func TestSinFuture(t *testing.T) {
  9. sinaConf := &DsConf{
  10. User: "",
  11. PassWord: "",
  12. Url: "http://hq.sinajs.cn/list",
  13. SaveDir: "./",
  14. Run: true,
  15. }
  16. ds, _ := newSinaFutureDS(sinaConf) //, err
  17. //if err != nil {
  18. //t.Fatal(err)
  19. //}
  20. go ds.Run()
  21. chmk := ds.GetMarket()
  22. for mk := range chmk {
  23. log.Println(getTime(mk.Timestamp), mk.InsId)
  24. }
  25. log.Println("@@@@@@@:go here")
  26. }