broadcast_test.go 488 B

12345678910111213141516171819
  1. package dao
  2. import (
  3. "fmt"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestBroadcast(t *testing.T) {
  8. Convey("err should be nil", t, func() {
  9. var err error
  10. info := []byte(fmt.Sprintf(`["%.2f,%d,%d,%d,%d,%d,%d,%s,%d","%s"]`, 1.01, 0, 25, 0xFF, 1123, 23, 0, "abc", 1, `德玛西亚万岁\\(≧▽≦)/`))
  11. if err = testDao.BroadcastInGoim(c, 123, 456, info); err != nil {
  12. t.Logf("testDao.Broadcast(%s) error(%v)", info, err)
  13. }
  14. So(err, ShouldBeNil)
  15. })
  16. }