(t *testing.T)
| 209 | } |
| 210 | |
| 211 | func TestEncBuiltinMarshalFloat64(t *testing.T) { |
| 212 | s := RunServerOnPort(TEST_PORT) |
| 213 | defer s.Shutdown() |
| 214 | |
| 215 | ec := NewDefaultEConn(t) |
| 216 | defer ec.Close() |
| 217 | ch := make(chan bool) |
| 218 | |
| 219 | testN := float64(22.22) |
| 220 | |
| 221 | ec.Subscribe("enc_float", func(n float64) { |
| 222 | if n != testN { |
| 223 | t.Fatalf("Received test number of %f, wanted %f\n", n, testN) |
| 224 | } |
| 225 | ch <- true |
| 226 | }) |
| 227 | ec.Publish("enc_float", testN) |
| 228 | if e := Wait(ch); e != nil { |
| 229 | if ec.LastError() != nil { |
| 230 | e = ec.LastError() |
| 231 | } |
| 232 | t.Fatalf("Did not receive the message: %s", e) |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | func TestEncBuiltinMarshalBool(t *testing.T) { |
| 237 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected