Tests
This commit is contained in:
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
func TestCursor(t *testing.T) {
|
func TestCursor(t *testing.T) {
|
||||||
Convey("Given a cursor", t, func() {
|
Convey("Given a cursor", t, func() {
|
||||||
s := New(4, 4)
|
s := New(4, 4, false)
|
||||||
So(*s.cursor, ShouldResemble, Point{0, 0})
|
So(*s.cursor, ShouldResemble, Point{0, 0})
|
||||||
|
|
||||||
Convey("When moving cell to cell", func() {
|
Convey("When moving cell to cell", func() {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ func TestHistory(t *testing.T) {
|
|||||||
Convey("Given a game's history", t, func() {
|
Convey("Given a game's history", t, func() {
|
||||||
|
|
||||||
Convey("You can maintain a history of all actions", func() {
|
Convey("You can maintain a history of all actions", func() {
|
||||||
s := New(2, 2)
|
s := New(2, 2, false)
|
||||||
s.Flag()
|
s.Flag()
|
||||||
s.Mark()
|
s.Mark()
|
||||||
s.Clear()
|
s.Clear()
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
func TestState(t *testing.T) {
|
func TestState(t *testing.T) {
|
||||||
Convey("Given a game state", t, func() {
|
Convey("Given a game state", t, func() {
|
||||||
s := New(2, 2)
|
s := New(2, 2, false)
|
||||||
for x := 0; x < 4; x++ {
|
for x := 0; x < 4; x++ {
|
||||||
for y := 0; y < 4; y++ {
|
for y := 0; y < 4; y++ {
|
||||||
s.cells.kill(Point{x, y})
|
s.cells.kill(Point{x, y})
|
||||||
|
|||||||
Reference in New Issue
Block a user