]> git.scottworley.com Git - reliable-chat/blobdiff - server/server_test.go
Copy less: pass messages by pointer
[reliable-chat] / server / server_test.go
index 0afb3846d6c94bcdc304d959ebacc10a673c1e4b..d1bababe56686e455d876bf16985f763e0743dd4 100644 (file)
@@ -8,9 +8,9 @@ func TestMessageInsertAndRetreive(t *testing.T) {
        at := time.Now()
        var zero_time time.Time
        store := start_store()
-       store.Add <- Message{at, say}
+       store.Add <- &Message{at, say}
        messages_from_store := make(chan []Message, 1)
-       store.Get <- StoreRequest{zero_time, messages_from_store}
+       store.Get <- &StoreRequest{zero_time, messages_from_store}
        messages := <-messages_from_store
        if len(messages) != 1 {
                t.Fail()