(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestEncBuiltinMarshalInt(t *testing.T) { |
| 112 | s := RunServerOnPort(TEST_PORT) |
| 113 | defer s.Shutdown() |
| 114 | |
| 115 | ec := NewDefaultEConn(t) |
| 116 | defer ec.Close() |
| 117 | ch := make(chan bool) |
| 118 | |
| 119 | testN := 22 |
| 120 | |
| 121 | ec.Subscribe("enc_int", func(n int) { |
| 122 | if n != testN { |
| 123 | t.Fatalf("Received test number of %d, wanted %d\n", n, testN) |
| 124 | } |
| 125 | ch <- true |
| 126 | }) |
| 127 | ec.Publish("enc_int", testN) |
| 128 | if e := Wait(ch); e != nil { |
| 129 | if ec.LastError() != nil { |
| 130 | e = ec.LastError() |
| 131 | } |
| 132 | t.Fatalf("Did not receive the message: %s", e) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | func TestEncBuiltinMarshalInt32(t *testing.T) { |
| 137 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected