Skip to content

Commit

Permalink
Merge pull request #9 from twpayne/remove-incomplete-32-bit-platform-…
Browse files Browse the repository at this point in the history
…support

Remove incomplete 32-bit platform support
  • Loading branch information
twpayne committed Jan 25, 2022
2 parents b7e77e2 + 6b0fd66 commit 5c8bf62
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 36 deletions.
6 changes: 0 additions & 6 deletions export_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions polyline.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func DecodeInt(buf []byte) (int, []byte, error) {
return 0, nil, err
case u&1 == 0:
return int(u >> 1), buf, nil
case u == maxUint:
return minInt, buf, nil
case u == math.MaxUint64:
return math.MinInt64, buf, nil
default:
return -int((u + 1) >> 1), buf, nil
}
Expand Down
12 changes: 0 additions & 12 deletions polyline_go116.go

This file was deleted.

12 changes: 0 additions & 12 deletions polyline_go117.go

This file was deleted.

8 changes: 4 additions & 4 deletions polyline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ func TestInt(t *testing.T) {
{i: -75000, s: "nnqC"},
{i: 255200, s: "_mqN"},
{i: -550300, s: "vxq`@"},
{i: polyline.MaxInt, s: "}~~~~~~~~~~~N"},
{i: polyline.MaxInt - 1, s: "{~~~~~~~~~~~N"},
{i: polyline.MinInt + 1, s: "|~~~~~~~~~~~N"},
{i: polyline.MinInt, s: "~~~~~~~~~~~~N"},
{i: math.MaxInt64, s: "}~~~~~~~~~~~N"},
{i: math.MaxInt64 - 1, s: "{~~~~~~~~~~~N"},
{i: math.MinInt64 + 1, s: "|~~~~~~~~~~~N"},
{i: math.MinInt64, s: "~~~~~~~~~~~~N"},
} {
got, b, err := polyline.DecodeInt([]byte(tc.s))
assert.NoError(t, err)
Expand Down

0 comments on commit 5c8bf62

Please sign in to comment.