aboutsummaryrefslogtreecommitdiff
path: root/src/test/canfield_test.cpp
diff options
context:
space:
mode:
authorthecharlesblake2018-01-05 15:54:04 +0000
committerthecharlesblake2018-01-05 15:55:43 +0000
commite9678bfc154aaf59c9c7c965d99fd50de8532cce (patch)
treef29524cb996b7bd95247694ed8405093462366e2 /src/test/canfield_test.cpp
parentAdd json rules for canfield (diff)
downloadmetasol-e9678bfc154aaf59c9c7c965d99fd50de8532cce.tar.gz
metasol-e9678bfc154aaf59c9c7c965d99fd50de8532cce.zip

Add unit tests for canfield

Diffstat (limited to 'src/test/canfield_test.cpp')
-rw-r--r--src/test/canfield_test.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/canfield_test.cpp b/src/test/canfield_test.cpp
new file mode 100644
index 0000000..63fd615
--- /dev/null
+++ b/src/test/canfield_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/canfield/";
+const static std::string type = "simple-canfield";
+
+TEST(Canfield, SimpleSolvable) {
+ EXPECT_TRUE(th::is_solvable(path + "SimpleSolvable.json", type));
+}
+
+TEST(Canfield, ComplexSolvable) {
+ EXPECT_TRUE(th::is_solvable(path + "ComplexSolvable.json", type));
+}
+
+TEST(Canfield, SimpleUnsolvable) {
+ EXPECT_FALSE(th::is_solvable(path + "SimpleUnsolvable.json", type));
+}
+
+TEST(Canfield, ComplexUnsolvable) {
+ EXPECT_FALSE(th::is_solvable(path + "ComplexUnsolvable.json", type));
+}