Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of el17ajf by
Diff: UnitTests/UnitTests.h
- Revision:
- 41:91b0c73b9e02
- Child:
- 44:44aa01af687e
diff -r 052819060e38 -r 91b0c73b9e02 UnitTests/UnitTests.h --- /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