Add RulesetError test case.
Remove old comments.
This commit is contained in:
parent
2cbf8884bf
commit
accb598e29
4 changed files with 41 additions and 36 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package rules
|
||||
|
||||
import (
|
||||
//"errors"
|
||||
"math"
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
|
@ -513,7 +512,7 @@ func TestCreateNextBoardState(t *testing.T) {
|
|||
{ID: "one", Move: MoveUp},
|
||||
{ID: "two", Move: MoveDown},
|
||||
},
|
||||
ErrorSizeZeroBody,
|
||||
ErrorZeroLengthSnake,
|
||||
nil,
|
||||
},
|
||||
{
|
||||
|
|
@ -940,7 +939,7 @@ func TestMoveSnakesWrongID(t *testing.T) {
|
|||
|
||||
r := StandardRuleset{}
|
||||
err := r.moveSnakes(b, moves)
|
||||
require.Equal(t, ErrorNoMoveFound, err) // TODO: @bvanvugt is this a place where an "==" comparision should be used ?
|
||||
require.Equal(t, ErrorNoMoveFound, err)
|
||||
}
|
||||
|
||||
func TestMoveSnakesNotEnoughMoves(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue