diff options
Diffstat (limited to 'gemtext/parse_line_test.go')
-rw-r--r-- | gemtext/parse_line_test.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gemtext/parse_line_test.go b/gemtext/parse_line_test.go index 64c1bc7..0953103 100644 --- a/gemtext/parse_line_test.go +++ b/gemtext/parse_line_test.go @@ -46,12 +46,12 @@ func TestParseLinkLine(t *testing.T) { t.Fatalf("expected a LinkLine, got %T", line) } - if string(link.URL) != test.url { - t.Errorf("expected url %q, got %q", test.url, string(link.URL)) + if link.URL() != test.url { + t.Errorf("expected url %q, got %q", test.url, link.URL()) } - if string(link.Label) != test.label { - t.Errorf("expected label %q, got %q", test.label, string(link.Label)) + if link.Label() != test.label { + t.Errorf("expected label %q, got %q", test.label, link.Label()) } }) } @@ -93,8 +93,8 @@ func TestParsePreformatToggleLine(t *testing.T) { t.Fatalf("expected a PreformatToggleLine, got %T", line) } - if string(toggle.AltText) != test.altText { - t.Errorf("expected alt-text %q, got %q", test.altText, string(toggle.AltText)) + if toggle.AltText() != test.altText { + t.Errorf("expected alt-text %q, got %q", test.altText, toggle.AltText()) } }) } @@ -147,8 +147,8 @@ func TestParseHeadingLine(t *testing.T) { t.Fatalf("expected HeadingLine, got a %T", line) } - if string(hdg.Body) != test.body { - t.Errorf("expected body %q, got %q", test.body, string(hdg.Body)) + if hdg.Body() != test.body { + t.Errorf("expected body %q, got %q", test.body, hdg.Body()) } }) } @@ -188,8 +188,8 @@ func TestParseListItemLine(t *testing.T) { t.Fatalf("expected ListItemLine, got a %T", line) } - if string(li.Body) != test.body { - t.Errorf("expected body %q, got %q", test.body, string(li.Body)) + if li.Body() != test.body { + t.Errorf("expected body %q, got %q", test.body, li.Body()) } }) } @@ -233,8 +233,8 @@ func TestParseQuoteLine(t *testing.T) { t.Fatalf("expected QuoteLine , got a %T", line) } - if string(qu.Body) != test.body { - t.Errorf("expected body %q, got %q", test.body, string(qu.Body)) + if qu.Body() != test.body { + t.Errorf("expected body %q, got %q", test.body, qu.Body()) } }) } |