(t *testing.T)
| 184 | } |
| 185 | |
| 186 | func TestEncBuiltinMarshalFloat32(t *testing.T) { |
| 187 | s := RunServerOnPort(TEST_PORT) |
| 188 | defer s.Shutdown() |
| 189 | |
| 190 | ec := NewDefaultEConn(t) |
| 191 | defer ec.Close() |
| 192 | ch := make(chan bool) |
| 193 | |
| 194 | testN := float32(22) |
| 195 | |
| 196 | ec.Subscribe("enc_float", func(n float32) { |
| 197 | if n != testN { |
| 198 | t.Fatalf("Received test number of %f, wanted %f\n", n, testN) |
| 199 | } |
| 200 | ch <- true |
| 201 | }) |
| 202 | ec.Publish("enc_float", testN) |
| 203 | if e := Wait(ch); e != nil { |
| 204 | if ec.LastError() != nil { |
| 205 | e = ec.LastError() |
| 206 | } |
| 207 | t.Fatalf("Did not receive the message: %s", e) |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | func TestEncBuiltinMarshalFloat64(t *testing.T) { |
| 212 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected