(t *testing.T)
| 286 | } |
| 287 | |
| 288 | func TestEncBuiltinFailedEncodedPublish(t *testing.T) { |
| 289 | s := RunServerOnPort(TEST_PORT) |
| 290 | defer s.Shutdown() |
| 291 | |
| 292 | ec := NewJsonEncodedConn(t) |
| 293 | defer ec.Close() |
| 294 | |
| 295 | ch := make(chan bool) |
| 296 | err := ec.Publish("foo", ch) |
| 297 | if err == nil { |
| 298 | t.Fatal("Expected an error trying to publish a channel") |
| 299 | } |
| 300 | err = ec.PublishRequest("foo", "bar", ch) |
| 301 | if err == nil { |
| 302 | t.Fatal("Expected an error trying to publish a channel") |
| 303 | } |
| 304 | var cr chan bool |
| 305 | err = ec.Request("foo", ch, &cr, 1*time.Second) |
| 306 | if err == nil { |
| 307 | t.Fatal("Expected an error trying to publish a channel") |
| 308 | } |
| 309 | err = ec.LastError() |
| 310 | if err != nil { |
| 311 | t.Fatalf("Expected LastError to be nil: %q ", err) |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | func TestEncBuiltinDecodeConditionals(t *testing.T) { |
| 316 | je := &builtin.JsonEncoder{} |
nothing calls this directly
no test coverage detected