(t *testing.T)
| 134 | } |
| 135 | |
| 136 | func TestEncBuiltinMarshalInt32(t *testing.T) { |
| 137 | s := RunServerOnPort(TEST_PORT) |
| 138 | defer s.Shutdown() |
| 139 | |
| 140 | ec := NewDefaultEConn(t) |
| 141 | defer ec.Close() |
| 142 | ch := make(chan bool) |
| 143 | |
| 144 | testN := 22 |
| 145 | |
| 146 | ec.Subscribe("enc_int", func(n int32) { |
| 147 | if n != int32(testN) { |
| 148 | t.Fatalf("Received test number of %d, wanted %d\n", n, testN) |
| 149 | } |
| 150 | ch <- true |
| 151 | }) |
| 152 | ec.Publish("enc_int", testN) |
| 153 | if e := Wait(ch); e != nil { |
| 154 | if ec.LastError() != nil { |
| 155 | e = ec.LastError() |
| 156 | } |
| 157 | t.Fatalf("Did not receive the message: %s", e) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | func TestEncBuiltinMarshalInt64(t *testing.T) { |
| 162 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected