From 0ea8aa6fe521af9c8967f28146451be2fcea5569 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 7 Nov 2018 10:49:10 -0800 Subject: [PATCH] command: Fix TestWorkspace_createWithState The State.Equal function is now more precise than this test needs. It's only trying to distinguish between an empty state and a non-empty state, so the string representation of state is good enough to get that done while disregarding other subtle differences. --- command/workspace_command_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/workspace_command_test.go b/command/workspace_command_test.go index 4503850fd..ea645e006 100644 --- a/command/workspace_command_test.go +++ b/command/workspace_command_test.go @@ -276,8 +276,8 @@ func TestWorkspace_createWithState(t *testing.T) { newState := sMgr.State() - if !originalState.Equal(newState) { - t.Fatalf("states not equal\norig: %s\nnew: %s", originalState, newState) + if got, want := newState.String(), originalState.String(); got != want { + t.Fatalf("states not equal\ngot: %s\nwant: %s", got, want) } }