From d35bd25e2848073c92250d2461bbab7841e9dedd Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Sat, 21 Oct 2023 17:03:14 -0500 Subject: [PATCH] Prepared test files --- test/CMakeLists.txt | 4 +- test/{ => files}/sudoku-easy-01.txt | 0 test/{ => files}/sudoku-easy-02.txt | 0 test/{ => files}/sudoku-easy-03.txt | 0 test/{ => files}/sudoku-easy-04.txt | 0 test/{ => files}/sudoku-easy-05.txt | 0 test/{ => files}/sudoku-easy-06.txt | 0 test/{ => files}/sudoku-easy-07.txt | 0 test/{ => files}/sudoku-easy-08.txt | 0 test/{ => files}/sudoku-easy-09.txt | 0 test/{ => files}/sudoku-easy-10.txt | 0 test/{ => files}/sudoku-easy-11.txt | 0 test/{ => files}/sudoku-easy-12.txt | 0 test/{ => files}/sudoku-easy-13.txt | 0 test/{ => files}/sudoku-easy-14.txt | 0 test/{ => files}/sudoku-easy-15.txt | 0 test/{ => files}/sudoku-easy-16.txt | 0 test/{ => files}/sudoku-easy-17.txt | 0 test/{ => files}/sudoku-easy-18.txt | 0 test/{ => files}/sudoku-easy-19.txt | 0 test/{ => files}/sudoku-easy-20.txt | 0 test/{ => files}/sudoku-easy-21.txt | 0 test/{ => files}/sudoku-easy-22.txt | 0 test/{ => files}/sudoku-easy-23.txt | 0 test/{ => files}/sudoku-easy-24.txt | 0 test/{ => files}/sudoku-easy-25.txt | 0 test/{ => files}/sudoku-easy-26.txt | 0 test/{ => files}/sudoku-easy-27.txt | 0 test/{ => files}/sudoku-easy-28.txt | 0 test/{ => files}/sudoku-easy-29.txt | 0 test/{ => files}/sudoku-easy-30.txt | 0 test/{ => files}/sudoku-easy-31.txt | 0 test/{ => files}/sudoku-easy-32.txt | 0 test/{ => files}/sudoku-easy-33.txt | 0 test/{ => files}/sudoku-easy-34.txt | 0 test/{ => files}/sudoku-easy-35.txt | 0 test/{ => files}/sudoku-easy-36.txt | 0 test/{ => files}/sudoku-easy-37.txt | 0 test/{ => files}/sudoku-easy-38.txt | 0 test/{ => files}/sudoku-easy-39.txt | 0 test/{ => files}/sudoku-easy-40.txt | 0 test/{ => files}/sudoku-easy-41.txt | 0 test/{ => files}/sudoku-easy-42.txt | 0 test/{ => files}/sudoku-easy-43.txt | 0 test/{ => files}/sudoku-easy-44.txt | 0 test/{ => files}/sudoku-easy-45.txt | 0 test/{ => files}/sudoku-easy-46.txt | 0 test/{ => files}/sudoku-easy-47.txt | 0 test/{ => files}/sudoku-easy-48.txt | 0 test/{ => files}/sudoku-easy-49.txt | 0 test/{ => files}/sudoku-easy-50.txt | 0 test/{ => files}/sudoku-easy-full.txt | 0 test/test.cpp | 12 +- test/test_list.cpp | 354 ++++++++++++++++++++++++++ test/test_list.hpp | 55 ++++ 55 files changed, 415 insertions(+), 10 deletions(-) rename test/{ => files}/sudoku-easy-01.txt (100%) rename test/{ => files}/sudoku-easy-02.txt (100%) rename test/{ => files}/sudoku-easy-03.txt (100%) rename test/{ => files}/sudoku-easy-04.txt (100%) rename test/{ => files}/sudoku-easy-05.txt (100%) rename test/{ => files}/sudoku-easy-06.txt (100%) rename test/{ => files}/sudoku-easy-07.txt (100%) rename test/{ => files}/sudoku-easy-08.txt (100%) rename test/{ => files}/sudoku-easy-09.txt (100%) rename test/{ => files}/sudoku-easy-10.txt (100%) rename test/{ => files}/sudoku-easy-11.txt (100%) rename test/{ => files}/sudoku-easy-12.txt (100%) rename test/{ => files}/sudoku-easy-13.txt (100%) rename test/{ => files}/sudoku-easy-14.txt (100%) rename test/{ => files}/sudoku-easy-15.txt (100%) rename test/{ => files}/sudoku-easy-16.txt (100%) rename test/{ => files}/sudoku-easy-17.txt (100%) rename test/{ => files}/sudoku-easy-18.txt (100%) rename test/{ => files}/sudoku-easy-19.txt (100%) rename test/{ => files}/sudoku-easy-20.txt (100%) rename test/{ => files}/sudoku-easy-21.txt (100%) rename test/{ => files}/sudoku-easy-22.txt (100%) rename test/{ => files}/sudoku-easy-23.txt (100%) rename test/{ => files}/sudoku-easy-24.txt (100%) rename test/{ => files}/sudoku-easy-25.txt (100%) rename test/{ => files}/sudoku-easy-26.txt (100%) rename test/{ => files}/sudoku-easy-27.txt (100%) rename test/{ => files}/sudoku-easy-28.txt (100%) rename test/{ => files}/sudoku-easy-29.txt (100%) rename test/{ => files}/sudoku-easy-30.txt (100%) rename test/{ => files}/sudoku-easy-31.txt (100%) rename test/{ => files}/sudoku-easy-32.txt (100%) rename test/{ => files}/sudoku-easy-33.txt (100%) rename test/{ => files}/sudoku-easy-34.txt (100%) rename test/{ => files}/sudoku-easy-35.txt (100%) rename test/{ => files}/sudoku-easy-36.txt (100%) rename test/{ => files}/sudoku-easy-37.txt (100%) rename test/{ => files}/sudoku-easy-38.txt (100%) rename test/{ => files}/sudoku-easy-39.txt (100%) rename test/{ => files}/sudoku-easy-40.txt (100%) rename test/{ => files}/sudoku-easy-41.txt (100%) rename test/{ => files}/sudoku-easy-42.txt (100%) rename test/{ => files}/sudoku-easy-43.txt (100%) rename test/{ => files}/sudoku-easy-44.txt (100%) rename test/{ => files}/sudoku-easy-45.txt (100%) rename test/{ => files}/sudoku-easy-46.txt (100%) rename test/{ => files}/sudoku-easy-47.txt (100%) rename test/{ => files}/sudoku-easy-48.txt (100%) rename test/{ => files}/sudoku-easy-49.txt (100%) rename test/{ => files}/sudoku-easy-50.txt (100%) rename test/{ => files}/sudoku-easy-full.txt (100%) create mode 100644 test/test_list.cpp create mode 100644 test/test_list.hpp diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 8a65233..65c9e96 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,9 @@ find_package(unity REQUIRED) -include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${sudoku_SOURCE_DIR}/src) add_executable(testing test.cpp + test_list.cpp + ../src/sudoku.cpp ) set_target_properties(testing PROPERTIES LINKER_LANGUAGE CXX) target_link_libraries(testing unity) diff --git a/test/sudoku-easy-01.txt b/test/files/sudoku-easy-01.txt similarity index 100% rename from test/sudoku-easy-01.txt rename to test/files/sudoku-easy-01.txt diff --git a/test/sudoku-easy-02.txt b/test/files/sudoku-easy-02.txt similarity index 100% rename from test/sudoku-easy-02.txt rename to test/files/sudoku-easy-02.txt diff --git a/test/sudoku-easy-03.txt b/test/files/sudoku-easy-03.txt similarity index 100% rename from test/sudoku-easy-03.txt rename to test/files/sudoku-easy-03.txt diff --git a/test/sudoku-easy-04.txt b/test/files/sudoku-easy-04.txt similarity index 100% rename from test/sudoku-easy-04.txt rename to test/files/sudoku-easy-04.txt diff --git a/test/sudoku-easy-05.txt b/test/files/sudoku-easy-05.txt similarity index 100% rename from test/sudoku-easy-05.txt rename to test/files/sudoku-easy-05.txt diff --git a/test/sudoku-easy-06.txt b/test/files/sudoku-easy-06.txt similarity index 100% rename from test/sudoku-easy-06.txt rename to test/files/sudoku-easy-06.txt diff --git a/test/sudoku-easy-07.txt b/test/files/sudoku-easy-07.txt similarity index 100% rename from test/sudoku-easy-07.txt rename to test/files/sudoku-easy-07.txt diff --git a/test/sudoku-easy-08.txt b/test/files/sudoku-easy-08.txt similarity index 100% rename from test/sudoku-easy-08.txt rename to test/files/sudoku-easy-08.txt diff --git a/test/sudoku-easy-09.txt b/test/files/sudoku-easy-09.txt similarity index 100% rename from test/sudoku-easy-09.txt rename to test/files/sudoku-easy-09.txt diff --git a/test/sudoku-easy-10.txt b/test/files/sudoku-easy-10.txt similarity index 100% rename from test/sudoku-easy-10.txt rename to test/files/sudoku-easy-10.txt diff --git a/test/sudoku-easy-11.txt b/test/files/sudoku-easy-11.txt similarity index 100% rename from test/sudoku-easy-11.txt rename to test/files/sudoku-easy-11.txt diff --git a/test/sudoku-easy-12.txt b/test/files/sudoku-easy-12.txt similarity index 100% rename from test/sudoku-easy-12.txt rename to test/files/sudoku-easy-12.txt diff --git a/test/sudoku-easy-13.txt b/test/files/sudoku-easy-13.txt similarity index 100% rename from test/sudoku-easy-13.txt rename to test/files/sudoku-easy-13.txt diff --git a/test/sudoku-easy-14.txt b/test/files/sudoku-easy-14.txt similarity index 100% rename from test/sudoku-easy-14.txt rename to test/files/sudoku-easy-14.txt diff --git a/test/sudoku-easy-15.txt b/test/files/sudoku-easy-15.txt similarity index 100% rename from test/sudoku-easy-15.txt rename to test/files/sudoku-easy-15.txt diff --git a/test/sudoku-easy-16.txt b/test/files/sudoku-easy-16.txt similarity index 100% rename from test/sudoku-easy-16.txt rename to test/files/sudoku-easy-16.txt diff --git a/test/sudoku-easy-17.txt b/test/files/sudoku-easy-17.txt similarity index 100% rename from test/sudoku-easy-17.txt rename to test/files/sudoku-easy-17.txt diff --git a/test/sudoku-easy-18.txt b/test/files/sudoku-easy-18.txt similarity index 100% rename from test/sudoku-easy-18.txt rename to test/files/sudoku-easy-18.txt diff --git a/test/sudoku-easy-19.txt b/test/files/sudoku-easy-19.txt similarity index 100% rename from test/sudoku-easy-19.txt rename to test/files/sudoku-easy-19.txt diff --git a/test/sudoku-easy-20.txt b/test/files/sudoku-easy-20.txt similarity index 100% rename from test/sudoku-easy-20.txt rename to test/files/sudoku-easy-20.txt diff --git a/test/sudoku-easy-21.txt b/test/files/sudoku-easy-21.txt similarity index 100% rename from test/sudoku-easy-21.txt rename to test/files/sudoku-easy-21.txt diff --git a/test/sudoku-easy-22.txt b/test/files/sudoku-easy-22.txt similarity index 100% rename from test/sudoku-easy-22.txt rename to test/files/sudoku-easy-22.txt diff --git a/test/sudoku-easy-23.txt b/test/files/sudoku-easy-23.txt similarity index 100% rename from test/sudoku-easy-23.txt rename to test/files/sudoku-easy-23.txt diff --git a/test/sudoku-easy-24.txt b/test/files/sudoku-easy-24.txt similarity index 100% rename from test/sudoku-easy-24.txt rename to test/files/sudoku-easy-24.txt diff --git a/test/sudoku-easy-25.txt b/test/files/sudoku-easy-25.txt similarity index 100% rename from test/sudoku-easy-25.txt rename to test/files/sudoku-easy-25.txt diff --git a/test/sudoku-easy-26.txt b/test/files/sudoku-easy-26.txt similarity index 100% rename from test/sudoku-easy-26.txt rename to test/files/sudoku-easy-26.txt diff --git a/test/sudoku-easy-27.txt b/test/files/sudoku-easy-27.txt similarity index 100% rename from test/sudoku-easy-27.txt rename to test/files/sudoku-easy-27.txt diff --git a/test/sudoku-easy-28.txt b/test/files/sudoku-easy-28.txt similarity index 100% rename from test/sudoku-easy-28.txt rename to test/files/sudoku-easy-28.txt diff --git a/test/sudoku-easy-29.txt b/test/files/sudoku-easy-29.txt similarity index 100% rename from test/sudoku-easy-29.txt rename to test/files/sudoku-easy-29.txt diff --git a/test/sudoku-easy-30.txt b/test/files/sudoku-easy-30.txt similarity index 100% rename from test/sudoku-easy-30.txt rename to test/files/sudoku-easy-30.txt diff --git a/test/sudoku-easy-31.txt b/test/files/sudoku-easy-31.txt similarity index 100% rename from test/sudoku-easy-31.txt rename to test/files/sudoku-easy-31.txt diff --git a/test/sudoku-easy-32.txt b/test/files/sudoku-easy-32.txt similarity index 100% rename from test/sudoku-easy-32.txt rename to test/files/sudoku-easy-32.txt diff --git a/test/sudoku-easy-33.txt b/test/files/sudoku-easy-33.txt similarity index 100% rename from test/sudoku-easy-33.txt rename to test/files/sudoku-easy-33.txt diff --git a/test/sudoku-easy-34.txt b/test/files/sudoku-easy-34.txt similarity index 100% rename from test/sudoku-easy-34.txt rename to test/files/sudoku-easy-34.txt diff --git a/test/sudoku-easy-35.txt b/test/files/sudoku-easy-35.txt similarity index 100% rename from test/sudoku-easy-35.txt rename to test/files/sudoku-easy-35.txt diff --git a/test/sudoku-easy-36.txt b/test/files/sudoku-easy-36.txt similarity index 100% rename from test/sudoku-easy-36.txt rename to test/files/sudoku-easy-36.txt diff --git a/test/sudoku-easy-37.txt b/test/files/sudoku-easy-37.txt similarity index 100% rename from test/sudoku-easy-37.txt rename to test/files/sudoku-easy-37.txt diff --git a/test/sudoku-easy-38.txt b/test/files/sudoku-easy-38.txt similarity index 100% rename from test/sudoku-easy-38.txt rename to test/files/sudoku-easy-38.txt diff --git a/test/sudoku-easy-39.txt b/test/files/sudoku-easy-39.txt similarity index 100% rename from test/sudoku-easy-39.txt rename to test/files/sudoku-easy-39.txt diff --git a/test/sudoku-easy-40.txt b/test/files/sudoku-easy-40.txt similarity index 100% rename from test/sudoku-easy-40.txt rename to test/files/sudoku-easy-40.txt diff --git a/test/sudoku-easy-41.txt b/test/files/sudoku-easy-41.txt similarity index 100% rename from test/sudoku-easy-41.txt rename to test/files/sudoku-easy-41.txt diff --git a/test/sudoku-easy-42.txt b/test/files/sudoku-easy-42.txt similarity index 100% rename from test/sudoku-easy-42.txt rename to test/files/sudoku-easy-42.txt diff --git a/test/sudoku-easy-43.txt b/test/files/sudoku-easy-43.txt similarity index 100% rename from test/sudoku-easy-43.txt rename to test/files/sudoku-easy-43.txt diff --git a/test/sudoku-easy-44.txt b/test/files/sudoku-easy-44.txt similarity index 100% rename from test/sudoku-easy-44.txt rename to test/files/sudoku-easy-44.txt diff --git a/test/sudoku-easy-45.txt b/test/files/sudoku-easy-45.txt similarity index 100% rename from test/sudoku-easy-45.txt rename to test/files/sudoku-easy-45.txt diff --git a/test/sudoku-easy-46.txt b/test/files/sudoku-easy-46.txt similarity index 100% rename from test/sudoku-easy-46.txt rename to test/files/sudoku-easy-46.txt diff --git a/test/sudoku-easy-47.txt b/test/files/sudoku-easy-47.txt similarity index 100% rename from test/sudoku-easy-47.txt rename to test/files/sudoku-easy-47.txt diff --git a/test/sudoku-easy-48.txt b/test/files/sudoku-easy-48.txt similarity index 100% rename from test/sudoku-easy-48.txt rename to test/files/sudoku-easy-48.txt diff --git a/test/sudoku-easy-49.txt b/test/files/sudoku-easy-49.txt similarity index 100% rename from test/sudoku-easy-49.txt rename to test/files/sudoku-easy-49.txt diff --git a/test/sudoku-easy-50.txt b/test/files/sudoku-easy-50.txt similarity index 100% rename from test/sudoku-easy-50.txt rename to test/files/sudoku-easy-50.txt diff --git a/test/sudoku-easy-full.txt b/test/files/sudoku-easy-full.txt similarity index 100% rename from test/sudoku-easy-full.txt rename to test/files/sudoku-easy-full.txt diff --git a/test/test.cpp b/test/test.cpp index 6668b68..d65e30f 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,21 +1,15 @@ #include #include +#include "sudoku.hpp" +#include "test_list.hpp" void setUp() { ; } void tearDown() { ; } -int Math(void) { - return 2+2; -} - -void test_Math(void) { - TEST_ASSERT_EQUAL_INT(4, Math()); -} - int main(void) { UNITY_BEGIN(); - RUN_TEST(test_Math); + RUN_TEST(test_SudokuEasy01); return UNITY_END(); } diff --git a/test/test_list.cpp b/test/test_list.cpp new file mode 100644 index 0000000..6641fee --- /dev/null +++ b/test/test_list.cpp @@ -0,0 +1,354 @@ +#include "test_list.hpp" +#include +#include +#include "sudoku.hpp" + +void test_SudokuEasy01(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-01.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy02(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-02.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy03(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-03.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy04(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-04.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy05(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-05.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy06(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-06.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy07(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-07.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy08(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-08.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy09(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-09.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy10(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-10.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy11(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-11.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy12(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-12.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy13(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-13.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy14(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-14.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy15(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-15.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy16(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-16.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy17(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-17.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy18(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-18.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy19(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-19.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy20(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-20.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy21(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-21.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy22(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-22.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy23(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-23.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy24(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-24.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy25(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-25.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy26(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-26.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy27(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-27.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy28(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-28.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy29(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-29.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy30(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-30.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy31(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-31.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy32(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-32.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy33(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-33.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy34(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-34.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy35(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-35.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy36(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-36.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy37(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-37.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy38(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-38.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy39(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-39.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy40(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-40.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy41(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-41.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy42(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-42.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy43(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-43.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy44(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-44.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy45(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-45.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy46(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-46.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy47(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-47.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy48(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-48.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy49(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-49.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} + +void test_SudokuEasy50(void) { + Sudoku testGame; + testGame.FillBoard("test/files/sudoku-easy-50.txt"); + testGame.Solve(); + TEST_ASSERT_TRUE(testGame.IsBoardSolved()); +} diff --git a/test/test_list.hpp b/test/test_list.hpp new file mode 100644 index 0000000..1458fde --- /dev/null +++ b/test/test_list.hpp @@ -0,0 +1,55 @@ +#ifndef TEST_LIST_HPP +#define TEST_LIST_HPP + +void test_SudokuEasy01(void); +void test_SudokuEasy02(void); +void test_SudokuEasy03(void); +void test_SudokuEasy04(void); +void test_SudokuEasy05(void); +void test_SudokuEasy06(void); +void test_SudokuEasy07(void); +void test_SudokuEasy08(void); +void test_SudokuEasy09(void); +void test_SudokuEasy10(void); +void test_SudokuEasy11(void); +void test_SudokuEasy12(void); +void test_SudokuEasy13(void); +void test_SudokuEasy14(void); +void test_SudokuEasy15(void); +void test_SudokuEasy16(void); +void test_SudokuEasy17(void); +void test_SudokuEasy18(void); +void test_SudokuEasy19(void); +void test_SudokuEasy20(void); +void test_SudokuEasy21(void); +void test_SudokuEasy22(void); +void test_SudokuEasy23(void); +void test_SudokuEasy24(void); +void test_SudokuEasy25(void); +void test_SudokuEasy26(void); +void test_SudokuEasy27(void); +void test_SudokuEasy28(void); +void test_SudokuEasy29(void); +void test_SudokuEasy30(void); +void test_SudokuEasy31(void); +void test_SudokuEasy32(void); +void test_SudokuEasy33(void); +void test_SudokuEasy34(void); +void test_SudokuEasy35(void); +void test_SudokuEasy36(void); +void test_SudokuEasy37(void); +void test_SudokuEasy38(void); +void test_SudokuEasy39(void); +void test_SudokuEasy40(void); +void test_SudokuEasy41(void); +void test_SudokuEasy42(void); +void test_SudokuEasy43(void); +void test_SudokuEasy44(void); +void test_SudokuEasy45(void); +void test_SudokuEasy46(void); +void test_SudokuEasy47(void); +void test_SudokuEasy48(void); +void test_SudokuEasy49(void); +void test_SudokuEasy50(void); + +#endif