(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestEncBuiltinGobMarshalString(t *testing.T) { |
| 34 | s := RunServerOnPort(TEST_PORT) |
| 35 | defer s.Shutdown() |
| 36 | |
| 37 | ec := NewGobEncodedConn(t) |
| 38 | defer ec.Close() |
| 39 | ch := make(chan bool) |
| 40 | |
| 41 | testString := "Hello World!" |
| 42 | |
| 43 | ec.Subscribe("gob_string", func(s string) { |
| 44 | if s != testString { |
| 45 | t.Fatalf("Received test string of '%s', wanted '%s'\n", s, testString) |
| 46 | } |
| 47 | ch <- true |
| 48 | }) |
| 49 | ec.Publish("gob_string", testString) |
| 50 | if e := Wait(ch); e != nil { |
| 51 | t.Fatal("Did not receive the message") |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func TestEncBuiltinGobMarshalInt(t *testing.T) { |
| 56 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected