(t *testing.T)
| 117 | } |
| 118 | |
| 119 | func TestEncBuiltinJsonMarshalNull(t *testing.T) { |
| 120 | s := RunServerOnPort(TEST_PORT) |
| 121 | defer s.Shutdown() |
| 122 | |
| 123 | ec := NewJsonEncodedConn(t) |
| 124 | defer ec.Close() |
| 125 | |
| 126 | type TestType struct{} |
| 127 | ch := make(chan bool) |
| 128 | |
| 129 | var testValue *TestType |
| 130 | |
| 131 | ec.Subscribe("json_null", func(i any) { |
| 132 | if i != nil { |
| 133 | t.Fatalf("Received test of '%v', wanted 'nil'\n", i) |
| 134 | } |
| 135 | ch <- true |
| 136 | }) |
| 137 | ec.Publish("json_null", testValue) |
| 138 | if e := Wait(ch); e != nil { |
| 139 | t.Fatal("Did not receive the message") |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | func TestEncBuiltinJsonMarshalArray(t *testing.T) { |
| 144 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected