Commits

Anonymous committed c7f0f2e

Moved the test_off_by_one closer.

  • Participants
  • Parent commits f8ec46e

Comments (0)

Files changed (1)

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

 
 test_create_and_free()
 
+def test_off_by_one():
+    m = Mat()
+    # TEST
+    eq_ok (
+            m.create(1, 3), 
+            NK_SOLVE_ERROR__SUCCESS, 
+            "off_by_one create"
+            )
+
+    # TEST
+    ok (m.matrix, "off_by_one matrix is allocated")
+
+    # TEST
+    eq_ok (
+            m.set(0, 2, NK_SOLVE_VERDICT__BLACK),
+            NK_SOLVE_ERROR__SUCCESS,
+            "off_by_one value set.",
+        )
+
+    # TEST
+    eq_ok (
+            m.free(),
+            NK_SOLVE_ERROR__SUCCESS,
+            "off_by_one free was successful"
+            )
+
+test_off_by_one()
+
 def test_set_and_get():
     m = Mat()
     # TEST
 
 test_set_and_get()
 
-def test_off_by_one():
-    m = Mat()
-    # TEST
-    eq_ok (
-            m.create(1, 3), 
-            NK_SOLVE_ERROR__SUCCESS, 
-            "off_by_one create"
-            )
 
-    # TEST
-    ok (m.matrix, "off_by_one matrix is allocated")
-
-    # TEST
-    eq_ok (
-            m.set(0, 2, NK_SOLVE_VERDICT__BLACK),
-            NK_SOLVE_ERROR__SUCCESS,
-            "off_by_one value set.",
-        )
-
-    # TEST
-    eq_ok (
-            m.free(),
-            NK_SOLVE_ERROR__SUCCESS,
-            "off_by_one free was successful"
-            )
-
-
-test_off_by_one()
-