ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
41:91b0c73b9e02
Child:
44:44aa01af687e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/UnitTests/UnitTests.h	Thu May 09 12:10:29 2019 +0000
@@ -0,0 +1,35 @@
+class UnitTests {
+public:
+    /**
+     * @brief Runs all unit tests, and prints their name
+     */
+    static void runAllTests();
+private:
+    /**
+     * @brief 
+     * @param description A description of the test to print if it fails
+     * @param result The result of the test, if it's false the error will print
+     */
+    static void assertTrue(const char * description, bool result);
+    
+    /**
+     * @brief Test the tetromino is the same after being rotated 360 degrees
+     */
+    static void testTetromino();
+    
+    /**
+     * @brief Test the blocks are instanciated correctly
+     */
+    static void testBlock();
+    
+    /**
+     * @brief Tests that preferences are saved and retrived correctly
+     */
+    static void testPrefs();
+    
+    /**
+     * @brief Test that the space is taken up when a tetromino 
+     * is inserted into the grid
+     */
+    static void testGrid();
+};
\ No newline at end of file