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.

14 lines
313 B

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