change all "int32" types to "int" (#75)

This commit is contained in:
Torben 2022-05-25 11:17:41 -07:00 committed by GitHub
parent 2d8342018e
commit 3bd1e47bb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 176 additions and 176 deletions

View file

@ -250,16 +250,16 @@ func TestEdgeCrossingEating(t *testing.T) {
func TestWrap(t *testing.T) {
// no wrap
assert.Equal(t, int32(0), wrap(0, 0, 0))
assert.Equal(t, int32(0), wrap(0, 1, 0))
assert.Equal(t, int32(0), wrap(0, 0, 1))
assert.Equal(t, int32(1), wrap(1, 0, 1))
assert.Equal(t, 0, wrap(0, 0, 0))
assert.Equal(t, 0, wrap(0, 1, 0))
assert.Equal(t, 0, wrap(0, 0, 1))
assert.Equal(t, 1, wrap(1, 0, 1))
// wrap to min
assert.Equal(t, int32(0), wrap(2, 0, 1))
assert.Equal(t, 0, wrap(2, 0, 1))
// wrap to max
assert.Equal(t, int32(1), wrap(-1, 0, 1))
assert.Equal(t, 1, wrap(-1, 0, 1))
}
// Checks that snakes moving out of bounds get wrapped to the other side.