diff options
| author | thecharlesblake | 2017-12-26 18:05:10 +0000 |
|---|---|---|
| committer | thecharlesblake | 2017-12-26 18:05:10 +0000 |
| commit | a84d8dc3860c324f6dc622e8eb9f983acd7f692c (patch) | |
| tree | 32da0815850626c61249f16c833f71691b8b2c32 | |
| parent | Add basic tableau deal parsing (diff) | |
| download | metasol-a84d8dc3860c324f6dc622e8eb9f983acd7f692c.tar.gz metasol-a84d8dc3860c324f6dc622e8eb9f983acd7f692c.zip | |
Add basic outline for spanish patience testing
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/test/main_test.cpp | 19 | ||||
| -rw-r--r-- | src/test/spanish_patience_test.cpp | 11 | ||||
| -rw-r--r-- | src/test/test_helper.cpp | 9 | ||||
| -rw-r--r-- | src/test/test_helper.h | 16 |
5 files changed, 37 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 225d838..b0761c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(sources src/main/main.cpp src/main/input-output/command_line_helper.cpp src/main/solver/solver.cpp src/main/solver/solver.h src/main/game/game_state.cpp src/main/game/game_state.h src/main/game/sol_rules.h src/main/game/sol_rules.cpp src/main/game/pile.cpp src/main/game/pile.h src/main/util/util.cpp src/main/util/util.h src/main/input-output/sol_preset_types.h src/main/input-output/sol_preset_types.cpp) -set(sources_test src/test/main_test.cpp) +set(sources_test src/test/spanish_patience_test.cpp src/test/test_helper.cpp src/test/test_helper.h) ############################################################################### ## Rapid JSON setup ########################################################### diff --git a/src/test/main_test.cpp b/src/test/main_test.cpp deleted file mode 100644 index 3f2081f..0000000 --- a/src/test/main_test.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// -// Created by thecharlesblake on 10/4/17. -// - -#include <gtest/gtest.h> - -const int actualValTrue = 4; -const int actualValFalse = 8; -const int expectVal = 4; - -namespace { - TEST(StrCompare, CStrEqual) { - EXPECT_EQ(expectVal, actualValTrue); - } - - TEST(StrCompare, CStrNotEqual) { - EXPECT_NE(expectVal, actualValFalse); - } -} diff --git a/src/test/spanish_patience_test.cpp b/src/test/spanish_patience_test.cpp new file mode 100644 index 0000000..f75fc8b --- /dev/null +++ b/src/test/spanish_patience_test.cpp @@ -0,0 +1,11 @@ +// +// Created by thecharlesblake on 10/4/17. +// + +#include <gtest/gtest.h> + +#include "test_helper.h" + +TEST(SpanishPatience, SPTestName) { + EXPECT_TRUE(test_helper::is_solvable("i", "simple-spanish-patience")); +} diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp new file mode 100644 index 0000000..5e08bc3 --- /dev/null +++ b/src/test/test_helper.cpp @@ -0,0 +1,9 @@ +// +// Created by thecharlesblake on 12/26/17. +// + +#include "test_helper.h" + +bool test_helper::is_solvable(std::string, std::string) { + return false; +} diff --git a/src/test/test_helper.h b/src/test/test_helper.h new file mode 100644 index 0000000..38bdfc0 --- /dev/null +++ b/src/test/test_helper.h @@ -0,0 +1,16 @@ +// +// Created by thecharlesblake on 12/26/17. +// + +#ifndef SOLVITAIRE_TEST_HELPER_H +#define SOLVITAIRE_TEST_HELPER_H + +#include <string> + +class test_helper { +public: + static bool is_solvable(std::string, std::string); +}; + + +#endif //SOLVITAIRE_TEST_HELPER_H |
