Commits

Anonymous committed 4ed4d75

Added tests for negative co-ordinates.

  • Participants
  • Parent commits a0a5f5a

Comments (0)

Files changed (1)

File nurikabe-solver/t/verdict-matrix-tests.py.t

 from TAP.Simple import *
 from ctypes import *
 
-plan(8)
+plan(10)
 
 NK_SOLVE_ERROR__SUCCESS = 0
 NK_SOLVE_ERROR__ALLOC_FAILED = 1
             NK_SOLVE_ERROR__X_OUT_OF_BOUNDS,
             "X is out of bounds",
         )
+    
+    # TEST
+    eq_ok (
+            m.set(-1,2, NK_SOLVE_VERDICT__BLACK),
+            NK_SOLVE_ERROR__Y_OUT_OF_BOUNDS,
+            "Y (= -1) is out of bounds",
+        )
+
+    # TEST
+    eq_ok (
+            m.set(0,-2, NK_SOLVE_VERDICT__BLACK),
+            NK_SOLVE_ERROR__X_OUT_OF_BOUNDS,
+            "X (= -2) is out of bounds",
+        )
 
     # TEST
     eq_ok (