From a84d8dc3860c324f6dc622e8eb9f983acd7f692c Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Tue, 26 Dec 2017 18:05:10 +0000 Subject: Add basic outline for spanish patience testing --- src/test/spanish_patience_test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/test/spanish_patience_test.cpp (limited to 'src/test/spanish_patience_test.cpp') 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 + +#include "test_helper.h" + +TEST(SpanishPatience, SPTestName) { + EXPECT_TRUE(test_helper::is_solvable("i", "simple-spanish-patience")); +} -- cgit v1.2.1 From f8931f348ef456d9fac78b5cadad280f81dfcfc6 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Wed, 27 Dec 2017 00:04:32 +0000 Subject: First sp test working --- src/test/spanish_patience_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/test/spanish_patience_test.cpp') diff --git a/src/test/spanish_patience_test.cpp b/src/test/spanish_patience_test.cpp index f75fc8b..4168193 100644 --- a/src/test/spanish_patience_test.cpp +++ b/src/test/spanish_patience_test.cpp @@ -6,6 +6,10 @@ #include "test_helper.h" +typedef test_helper th; + +const static std::string type = "simple-spanish-patience"; + TEST(SpanishPatience, SPTestName) { - EXPECT_TRUE(test_helper::is_solvable("i", "simple-spanish-patience")); + EXPECT_TRUE(th::is_solvable("SPTestName", type)); } -- cgit v1.2.1 From 6c4bdf37d6bebe3562df9c9b459e6b7036f21dea Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Wed, 27 Dec 2017 00:23:07 +0000 Subject: All basic sp tests complete --- src/test/spanish_patience_test.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/test/spanish_patience_test.cpp') diff --git a/src/test/spanish_patience_test.cpp b/src/test/spanish_patience_test.cpp index 4168193..8973a53 100644 --- a/src/test/spanish_patience_test.cpp +++ b/src/test/spanish_patience_test.cpp @@ -8,8 +8,21 @@ typedef test_helper th; +const static std::string path = "resources/spanish_patience/"; const static std::string type = "simple-spanish-patience"; -TEST(SpanishPatience, SPTestName) { - EXPECT_TRUE(th::is_solvable("SPTestName", type)); +TEST(SpanishPatience, SimpleSolvable) { + EXPECT_TRUE(th::is_solvable(path + "SimpleSolvable.json", type)); +} + +TEST(SpanishPatience, ComplexSolvable) { + EXPECT_TRUE(th::is_solvable(path + "ComplexSolvable.json", type)); +} + +TEST(SpanishPatience, SimpleUnsolvable) { + EXPECT_FALSE(th::is_solvable(path + "SimpleUnsolvable.json", type)); +} + +TEST(SpanishPatience, ComplexUnsolvable) { + EXPECT_FALSE(th::is_solvable(path + "ComplexUnsolvable.json", type)); } -- cgit v1.2.1