You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
316 B
19 lines
316 B
6 years ago
|
package waitnode
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
6 years ago
|
|
||
|
"github.com/simple-rules/harmony-benchmark/p2p"
|
||
6 years ago
|
)
|
||
|
|
||
|
func TestNewNode(test *testing.T) {
|
||
6 years ago
|
p := p2p.Peer{Ip: "127.0.0.1", Port: "8080"}
|
||
|
wn := New(p)
|
||
|
b := wn.SerializeWaitNode()
|
||
|
wnd := DeserializeWaitNode(b)
|
||
|
if *wn != *wnd {
|
||
|
test.Error("Serialization is not working")
|
||
|
}
|
||
6 years ago
|
|
||
6 years ago
|
}
|