Commit 9f51b6d7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1e98227e
...@@ -131,7 +131,7 @@ type dialReq struct { ...@@ -131,7 +131,7 @@ type dialReq struct {
// //
// New does not check whether network name provided is unique. // New does not check whether network name provided is unique.
func New(name string) *Network { func New(name string) *Network {
return &Network{name: name} return &Network{name: name, hostMap: make(map[string]*Host)}
} }
// Host returns network access point by name // Host returns network access point by name
......
...@@ -78,6 +78,7 @@ func xwait(w interface { Wait() error }) { ...@@ -78,6 +78,7 @@ func xwait(w interface { Wait() error }) {
} }
func assertEq(t *testing.T, a, b interface{}) { func assertEq(t *testing.T, a, b interface{}) {
t.Helper()
if !reflect.DeepEqual(a, b) { if !reflect.DeepEqual(a, b) {
fmt.Printf("not equal:\nhave: %v\nwant: %v\n", a, b) fmt.Printf("not equal:\nhave: %v\nwant: %v\n", a, b)
t.Errorf("not equal:\nhave: %v\nwant: %v", a, b) t.Errorf("not equal:\nhave: %v\nwant: %v", a, b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment