diff options
author | Adam Scarr <adam@vektah.net> | 2017-08-06 23:32:10 +1000 |
---|---|---|
committer | Adam Scarr <adam@vektah.net> | 2017-08-06 23:32:10 +1000 |
commit | 666ea93dba377f267a2c8ecf97378a420db18383 (patch) | |
tree | 5efee0b6e4ccf44b854d9bb65e4e6fa5e7f86548 /html/html_test.go | |
parent | 9d7779e8ca5404f26abbd8cce0314d9cee967bba (diff) |
Eliminate a bunch of allocations
Diffstat (limited to 'html/html_test.go')
-rw-r--r-- | html/html_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/html/html_test.go b/html/html_test.go index defdc10..f2f8e6f 100644 --- a/html/html_test.go +++ b/html/html_test.go @@ -4,14 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" - . "github.com/vektah/goparsify" ) func TestParse(t *testing.T) { result, _, err := Parse(`<body>hello <p color="blue">world</p></body>`) require.NoError(t, err) - require.Equal(t, Tag{Name: "body", Attributes: map[string]string{}, Body: []Node{ + require.Equal(t, Tag{Name: "body", Attributes: map[string]string{}, Body: []interface{}{ "hello ", - Tag{Name: "p", Attributes: map[string]string{"color": "blue"}, Body: []Node{"world"}}, + Tag{Name: "p", Attributes: map[string]string{"color": "blue"}, Body: []interface{}{"world"}}, }}, result) } |