]> git.scottworley.com Git - slidingtile/blobdiff - sliding_tile_test.go
gofmt
[slidingtile] / sliding_tile_test.go
index 41be233cb203728499723359393edd1f4a889282..28392eef4599c4b9cd9d0a7968b57a8325d1a16c 100644 (file)
@@ -3,26 +3,26 @@ package main
 import "testing"
 
 func Test_read_board_from_strings(t *testing.T) {
-  b, err := read_board_from_strings([]string{"1","2","9","12","6","8","13","14","0","11","15","3","7","4","10","5"})
-  if err != nil || *b != Board([BOARD_SIZE]Space{1,2,9,12,6,8,13,14,0,11,15,3,7,4,10,5}) {
-    t.Fail()
-  }
+       b, err := read_board_from_strings([]string{"1", "2", "9", "12", "6", "8", "13", "14", "0", "11", "15", "3", "7", "4", "10", "5"})
+       if err != nil || *b != Board([BOARD_SIZE]Space{1, 2, 9, 12, 6, 8, 13, 14, 0, 11, 15, 3, 7, 4, 10, 5}) {
+               t.Fail()
+       }
 
-  // Not enough
-  b, err = read_board_from_strings([]string{"1","2","9","12","6","8","13","14","0","11","15","3","7","4","10"})
-  if err == nil {
-    t.Fail()
-  }
+       // Not enough
+       b, err = read_board_from_strings([]string{"1", "2", "9", "12", "6", "8", "13", "14", "0", "11", "15", "3", "7", "4", "10"})
+       if err == nil {
+               t.Fail()
+       }
 
-  // Not an integer
-  b, err = read_board_from_strings([]string{"1","foo","9","12","6","8","13","14","0","11","15","3","7","4","10","5"})
-  if err == nil {
-    t.Fail()
-  }
+       // Not an integer
+       b, err = read_board_from_strings([]string{"1", "foo", "9", "12", "6", "8", "13", "14", "0", "11", "15", "3", "7", "4", "10", "5"})
+       if err == nil {
+               t.Fail()
+       }
 
-  // Empty string
-  b, err = read_board_from_strings([]string{"1","","9","12","6","8","13","14","0","11","15","3","7","4","10","5"})
-  if err == nil {
-    t.Fail()
-  }
+       // Empty string
+       b, err = read_board_from_strings([]string{"1", "", "9", "12", "6", "8", "13", "14", "0", "11", "15", "3", "7", "4", "10", "5"})
+       if err == nil {
+               t.Fail()
+       }
 }