replica_placement_test.go 314 B

1234567891011121314
  1. package super_block
  2. import (
  3. "testing"
  4. )
  5. func TestReplicaPlacementSerialDeserial(t *testing.T) {
  6. rp, _ := NewReplicaPlacementFromString("001")
  7. newRp, _ := NewReplicaPlacementFromByte(rp.Byte())
  8. if rp.String() != newRp.String() {
  9. println("expected:", rp.String(), "actual:", newRp.String())
  10. t.Fail()
  11. }
  12. }