[gnome-2048] Move TestGrid near tests.



commit a54b77e77fde12ffed8838c13d65cd395aeff1b5
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Wed Feb 13 16:48:38 2019 +0100

    Move TestGrid near tests.

 src/grid.vala        | 15 +--------------
 src/test-tw12ht.vala | 13 +++++++++++++
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/src/grid.vala b/src/grid.vala
index 407d16b..2c65fff 100644
--- a/src/grid.vala
+++ b/src/grid.vala
@@ -407,7 +407,7 @@ private class Grid : Object
         return true;
     }
 
-    protected static bool _grid_is_full (ref uint8 [,] grid)
+    protected static bool _grid_is_full (ref uint8 [,] grid)    // is protected for tests
     {
         uint rows = grid.length [0];
         uint cols = grid.length [1];
@@ -624,19 +624,6 @@ private class Grid : Object
     }
 }
 
-private class TestGrid : Grid
-{
-    internal TestGrid (int rows, int cols)
-    {
-        Object (rows: rows, cols: cols);
-    }
-
-    internal bool grid_is_full ()
-    {
-        return _grid_is_full (ref _grid);
-    }
-}
-
 private struct GridPosition
 {
     public int row;
diff --git a/src/test-tw12ht.vala b/src/test-tw12ht.vala
index 322c099..d3d7fc1 100644
--- a/src/test-tw12ht.vala
+++ b/src/test-tw12ht.vala
@@ -135,3 +135,16 @@ private class TestTw12ht : Object
         new_content = loaded ? grid.save () : "";
     }
 }
+
+private class TestGrid : Grid
+{
+    internal TestGrid (int rows, int cols)
+    {
+        Object (rows: rows, cols: cols);
+    }
+
+    internal bool grid_is_full ()
+    {
+        return _grid_is_full (ref _grid);
+    }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]