(t *testing.T)
| 159 | } |
| 160 | |
| 161 | func TestEncBuiltinMarshalInt64(t *testing.T) { |
| 162 | s := RunServerOnPort(TEST_PORT) |
| 163 | defer s.Shutdown() |
| 164 | |
| 165 | ec := NewDefaultEConn(t) |
| 166 | defer ec.Close() |
| 167 | ch := make(chan bool) |
| 168 | |
| 169 | testN := 22 |
| 170 | |
| 171 | ec.Subscribe("enc_int", func(n int64) { |
| 172 | if n != int64(testN) { |
| 173 | t.Fatalf("Received test number of %d, wanted %d\n", n, testN) |
| 174 | } |
| 175 | ch <- true |
| 176 | }) |
| 177 | ec.Publish("enc_int", testN) |
| 178 | if e := Wait(ch); e != nil { |
| 179 | if ec.LastError() != nil { |
| 180 | e = ec.LastError() |
| 181 | } |
| 182 | t.Fatalf("Did not receive the message: %s", e) |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | func TestEncBuiltinMarshalFloat32(t *testing.T) { |
| 187 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected