X-Git-Url: http://git.scottworley.com/planeteer/blobdiff_plain/b7a6e28b4e3619a9b8ff18285bba9876de52549c..3cd35cb0f41da9be4e12057441145bf5d5a8f5c4:/planeteer_test.go diff --git a/planeteer_test.go b/planeteer_test.go index 42baae0..5bf75de 100644 --- a/planeteer_test.go +++ b/planeteer_test.go @@ -3,8 +3,8 @@ package main import "testing" func TestEncodeDecode(t *testing.T) { - dims := []int{3, 2, 4, 17, 26, 15, 2, 1, 2, 1} - var i int32 + dims := LogicalIndex{3, 2, 4, 17, 26, 15, 2, 1, 2, 1} + var i PhysicalIndex for i = 0; i < 636480; i++ { // Product of dims addr := DecodeIndex(dims, i) for j := 0; j < len(dims); j++ { @@ -19,18 +19,18 @@ func TestEncodeDecode(t *testing.T) { } func TestCommas(t *testing.T) { - cases := map[int32]string{ - 1: "1", - 10: "10", - 100: "100", - 1000: "1,000", - 10000: "10,000", - 100000: "100,000", + cases := map[Value]string{ + 1: "1", + 10: "10", + 100: "100", + 1000: "1,000", + 10000: "10,000", + 100000: "100,000", 1000000: "1,000,000", 1234567: "1,234,567", 1000567: "1,000,567", 1234000: "1,234,000", - 525000: "525,000", + 525000: "525,000", } for n, s := range cases { if Commas(n) != s {