Skip to content

Commit

Permalink
accounts: increase parseURL test coverage (ethereum#25033)
Browse files Browse the repository at this point in the history
accounts/url: add test logic what check null string to parseURL()
  • Loading branch information
dbadoy authored Jun 7, 2022
1 parent 403624a commit 450f5da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions accounts/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down

0 comments on commit 450f5da

Please sign in to comment.