(t *testing.T)
| 146 | } |
| 147 | |
| 148 | func TestNodeID_ToRawNodeID(t *testing.T) { |
| 149 | Convey("NodeID to RawNodeID", t, func() { |
| 150 | k1 := RawNodeID{ |
| 151 | Hash: hash.Hash{0xa}, |
| 152 | } |
| 153 | k1Node := NodeID(k1.String()) |
| 154 | So(k1Node.ToRawNodeID().IsEqual(&k1.Hash), ShouldBeTrue) |
| 155 | |
| 156 | id := "00000000011a34cb8142780f692a4097d883aa2ac8a534a070a134f11bcca573" |
| 157 | node := NodeID(id) |
| 158 | So(node.ToRawNodeID().String(), ShouldEqual, id) |
| 159 | So(node.ToRawNodeID().ToNodeID(), ShouldEqual, node) |
| 160 | }) |
| 161 | } |
| 162 | |
| 163 | func TestNodeID_IsEmpty(t *testing.T) { |
| 164 | Convey("NodeID is empty", t, func() { |
nothing calls this directly
no test coverage detected