(t *testing.T)
| 97 | } |
| 98 | |
| 99 | func TestEncBuiltinJsonMarshalBool(t *testing.T) { |
| 100 | s := RunServerOnPort(TEST_PORT) |
| 101 | defer s.Shutdown() |
| 102 | |
| 103 | ec := NewJsonEncodedConn(t) |
| 104 | defer ec.Close() |
| 105 | ch := make(chan bool) |
| 106 | |
| 107 | ec.Subscribe("json_bool", func(b bool) { |
| 108 | if !b { |
| 109 | t.Fatalf("Received test of '%v', wanted 'true'\n", b) |
| 110 | } |
| 111 | ch <- true |
| 112 | }) |
| 113 | ec.Publish("json_bool", true) |
| 114 | if e := Wait(ch); e != nil { |
| 115 | t.Fatal("Did not receive the message") |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | func TestEncBuiltinJsonMarshalNull(t *testing.T) { |
| 120 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected