aboutsummaryrefslogtreecommitdiff
path: root/src/test/spanish_patience_test.cpp
diff options
context:
space:
mode:
authorCharlie Blake2017-12-28 10:10:46 +0000
committerGitHub2017-12-28 10:10:46 +0000
commitc6275f508b1ff142a1085ebda8ae9276ea7611c4 (patch)
tree26b9855cf4a9ec808dae99b378fbbcfa7af4315f /src/test/spanish_patience_test.cpp
parentMerge pull request #25 from thecharlesblake/docs (diff)
parentAdded fc tests - currently intract. (diff)
downloadmetasol-c6275f508b1ff142a1085ebda8ae9276ea7611c4.tar.gz
metasol-c6275f508b1ff142a1085ebda8ae9276ea7611c4.zip

Merge pull request #26 from thecharlesblake/deal-description-and-test

Deal description and test

Diffstat (limited to 'src/test/spanish_patience_test.cpp')
-rw-r--r--src/test/spanish_patience_test.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/spanish_patience_test.cpp b/src/test/spanish_patience_test.cpp
new file mode 100644
index 0000000..8973a53
--- /dev/null
+++ b/src/test/spanish_patience_test.cpp
@@ -0,0 +1,28 @@
+//
+// Created by thecharlesblake on 10/4/17.
+//
+
+#include <gtest/gtest.h>
+
+#include "test_helper.h"
+
+typedef test_helper th;
+
+const static std::string path = "resources/spanish_patience/";
+const static std::string type = "simple-spanish-patience";
+
+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));
+}