From 14bd7e9a6550526cddeed14a602c19cfd6aedd9c Mon Sep 17 00:00:00 2001 From: Gianni Ceccarelli Date: Thu, 1 Aug 2019 17:12:33 +0100 Subject: simpler and more correct model --- go/mixed-server_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'go/mixed-server_test.go') diff --git a/go/mixed-server_test.go b/go/mixed-server_test.go index 63e545b..c7e3624 100644 --- a/go/mixed-server_test.go +++ b/go/mixed-server_test.go @@ -4,13 +4,13 @@ import ( "testing" ) -func eq_slice(t *testing.T, got, expected []string) { +func eq_slice(t *testing.T, got []WordAndCount, expected []string) { if !(len(got)==len(expected)) { t.Errorf("bad length, got %d expected %d",len(got),len(expected)) return } for i,got_elem := range got { - if !(got_elem == expected[i]) { + if !(got_elem.word == expected[i]) { t.Errorf("slices differ at %d, got %v expected %v", i,got_elem,expected[i]) return -- cgit v1.2.3