We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e395136 commit 020c4d1Copy full SHA for 020c4d1
multiaddr_test.go
@@ -74,6 +74,8 @@ func TestConstructFails(t *testing.T) {
74
"/unix",
75
"/ip4/1.2.3.4/tcp/80/unix",
76
"/ip4/127.0.0.1/tcp/9090/http/p2p-webcrt-direct",
77
+ "/",
78
+ "",
79
}
80
81
for _, a := range cases {
@@ -83,6 +85,13 @@ func TestConstructFails(t *testing.T) {
83
85
84
86
87
88
+func TestEmptyMultiaddr(t *testing.T) {
89
+ _, err := NewMultiaddrBytes([]byte{})
90
+ if err == nil {
91
+ t.Fatal("should have failed to parse empty multiaddr")
92
+ }
93
+}
94
+
95
func TestConstructSucceeds(t *testing.T) {
96
cases := []string{
97
"/ip4/1.2.3.4",
0 commit comments