Skip to content

Commit

Permalink
decoder_test use reflect.DeepEqual more sensibly
Browse files Browse the repository at this point in the history
  • Loading branch information
langmartin committed Apr 25, 2019
1 parent 5eb0f21 commit f5f70d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit f5f70d6

Please sign in to comment.