(t *testing.T)
| 59 | } |
| 60 | |
| 61 | func TestEncBuiltinMarshalString(t *testing.T) { |
| 62 | s := RunServerOnPort(TEST_PORT) |
| 63 | defer s.Shutdown() |
| 64 | |
| 65 | ec := NewDefaultEConn(t) |
| 66 | defer ec.Close() |
| 67 | ch := make(chan bool) |
| 68 | |
| 69 | testString := "Hello World!" |
| 70 | |
| 71 | ec.Subscribe("enc_string", func(s string) { |
| 72 | if s != testString { |
| 73 | t.Fatalf("Received test string of '%s', wanted '%s'\n", s, testString) |
| 74 | } |
| 75 | ch <- true |
| 76 | }) |
| 77 | ec.Publish("enc_string", testString) |
| 78 | if e := Wait(ch); e != nil { |
| 79 | if ec.LastError() != nil { |
| 80 | e = ec.LastError() |
| 81 | } |
| 82 | t.Fatalf("Did not receive the message: %s", e) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func TestEncBuiltinMarshalBytes(t *testing.T) { |
| 87 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected