From c0133b8ec7aae36648d48c7ddc17f885140393bf Mon Sep 17 00:00:00 2001 From: Zach Klippenstein Date: Sun, 19 Jul 2015 14:41:27 -0700 Subject: [PATCH] Fixed device watcher tests. --- device_watcher_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/device_watcher_test.go b/device_watcher_test.go index fb1597e..f52485b 100644 --- a/device_watcher_test.go +++ b/device_watcher_test.go @@ -2,6 +2,7 @@ package goadb import ( "log" + "reflect" "testing" "github.com/stretchr/testify/assert" @@ -165,10 +166,10 @@ func TestCalculateStateDiffsMultipleChangedMultipleUnchanged(t *testing.T) { diffs := calculateStateDiffs(oldStates, newStates) - assert.Equal(t, []DeviceStateChangedEvent{ + assert.True(t, reflect.DeepEqual([]DeviceStateChangedEvent{ DeviceStateChangedEvent{"1", "oldState", "newState"}, DeviceStateChangedEvent{"2", "oldState", "newState"}, - }, diffs) + }, diffs)) } func TestCalculateStateDiffsOneAddedOneRemovedOneChanged(t *testing.T) { @@ -183,11 +184,11 @@ func TestCalculateStateDiffsOneAddedOneRemovedOneChanged(t *testing.T) { diffs := calculateStateDiffs(oldStates, newStates) - assert.Equal(t, []DeviceStateChangedEvent{ + assert.True(t, reflect.DeepEqual([]DeviceStateChangedEvent{ DeviceStateChangedEvent{"1", "oldState", "newState"}, DeviceStateChangedEvent{"2", "removed", ""}, DeviceStateChangedEvent{"3", "", "added"}, - }, diffs) + }, diffs)) } func TestPublishDevicesRestartsServer(t *testing.T) {