remove PositionPackTest

This commit is contained in:
JunDao
2019-05-19 11:36:54 +08:00
parent 7e8118e21f
commit 637d5e35a3

View File

@ -39,24 +39,24 @@ func TestUnpackInt(t *testing.T) {
} }
} }
func TestPositionPack(t *testing.T) { // func TestPositionPack(t *testing.T) {
// This test is not good. // // This test is not good.
for x := -33554432; x < 33554432; x += 55443 { // for x := -33554432; x < 33554432; x += 55443 {
for y := -2048; y < 2048; y += 48 { // for y := -2048; y < 2048; y += 48 {
for z := -33554432; z < 33554432; z += 55443 { // for z := -33554432; z < 33554432; z += 55443 {
var ( // var (
pos1 Position // pos1 Position
pos2 = Position{x, y, z} // pos2 = Position{x, y, z}
) // )
if err := pos1.Decode(bytes.NewReader(pos2.Encode())); err != nil { // if err := pos1.Decode(bytes.NewReader(pos2.Encode())); err != nil {
t.Errorf("Position decode fail: %v", err) // t.Errorf("Position decode fail: %v", err)
} // }
if pos1 != pos2 { // if pos1 != pos2 {
t.Errorf("cannot pack %v", pos2) // t.Errorf("cannot pack %v", pos2)
} // }
} // }
} // }
} // }
} // }