From 450f5da7e1ea95a6cf898a5d00a328c03a7fbfff Mon Sep 17 00:00:00 2001 From: "Seungbae.yu" <72970043+dbadoy@users.noreply.github.com> Date: Tue, 7 Jun 2022 19:46:27 +0900 Subject: [PATCH] accounts: increase parseURL test coverage (#25033) accounts/url: add test logic what check null string to parseURL() --- accounts/url_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accounts/url_test.go b/accounts/url_test.go index bd6f35fa2..239aa06d2 100644 --- a/accounts/url_test.go +++ b/accounts/url_test.go @@ -32,9 +32,10 @@ func TestURLParsing(t *testing.T) { t.Errorf("expected: %v, got: %v", "ethereum.org", url.Path) } - _, err = parseURL("ethereum.org") - if err == nil { - t.Error("expected err, got: nil") + for _, u := range []string{"ethereum.org", ""} { + if _, err = parseURL(u); err == nil { + t.Errorf("input %v, expected err, got: nil", u) + } } }