From f5f70d661b5ed6b103954066617f67e1b47f4439 Mon Sep 17 00:00:00 2001 From: Lang Martin Date: Thu, 25 Apr 2019 08:00:34 -0400 Subject: [PATCH] decoder_test use reflect.DeepEqual more sensibly --- decoder_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/decoder_test.go b/decoder_test.go index adc4ee6..311aa26 100644 --- a/decoder_test.go +++ b/decoder_test.go @@ -804,18 +804,14 @@ func TestDecode_structureMapExtraKeys(t *testing.T) { var p hclVariable ast, _ := Parse(testReadFile(t, "structure_map_extra_keys.hcl")) DecodeObject(&p, ast) - if !(p.A == q.A && p.B == q.B && - reflect.DeepEqual(p.Found, q.Found) && - reflect.DeepEqual(p.Extra, q.Extra)) { + if !reflect.DeepEqual(p, q) { t.Fatal("not equal") } var j hclVariable ast, _ = Parse(testReadFile(t, "structure_map_extra_keys.json")) DecodeObject(&j, ast) - if !(j.A == q.A && j.B == q.B && - reflect.DeepEqual(j.Found, q.Found) && - reflect.DeepEqual(j.Extra, q.Extra)) { + if !reflect.DeepEqual(p, j) { t.Fatal("not equal") } }