From 7e232335b7c4cbea7119df7cb5d65c5aed3dc511 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kazlou Date: Mon, 7 May 2018 00:11:18 +0300 Subject: [PATCH] #58 Use go-test/deep instead of reflect --- config/config_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/config/config_test.go b/config/config_test.go index fc6dbbd..cdd38e0 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -2,9 +2,9 @@ package config import ( - "reflect" "testing" + "github.com/go-test/deep" "github.com/zshamrock/vmx/core" ) @@ -40,9 +40,7 @@ func TestReadConfig(t *testing.T) { WorkingDir: "", }, } - equal := reflect.DeepEqual(commands, expected) - if !equal { - t.Errorf("Read commands %v from the 'commands' config file don't match expected commands %v", - commands, expected) + if diff := deep.Equal(commands, expected); diff != nil { + t.Error(diff) } }