aboutsummaryrefslogtreecommitdiff
path: root/src/test/foundations_dominance_test.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-02-15 12:48:35 +0000
committerGitHub2018-02-15 12:48:35 +0000
commit9e865ef56ff2b90695343e2e5b7be6e05b2c56f4 (patch)
tree7cd620ee74084d74d849b44fae2db3897763cadb /src/test/foundations_dominance_test.cpp
parentMerge pull request #37 from thecharlesblake/docs (diff)
parentAdd simple auto-found + works w/ removable founds (diff)
downloadmetasol-9e865ef56ff2b90695343e2e5b7be6e05b2c56f4.tar.gz
metasol-9e865ef56ff2b90695343e2e5b7be6e05b2c56f4.zip

Merge pull request #38 from thecharlesblake/foundation-dominance

Foundation dominance

Diffstat (limited to 'src/test/foundations_dominance_test.cpp')
-rw-r--r--src/test/foundations_dominance_test.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/foundations_dominance_test.cpp b/src/test/foundations_dominance_test.cpp
new file mode 100644
index 0000000..48134f5
--- /dev/null
+++ b/src/test/foundations_dominance_test.cpp
@@ -0,0 +1,34 @@
+//
+// Created by thecharlesblake on 1/11/18.
+//
+
+#include <gtest/gtest.h>
+
+#include "test_helper.h"
+#include "../main/game/game_state.h"
+#include "../main/game/global_cache.h"
+
+typedef sol_rules::build_policy pol;
+
+TEST(FoundationsDominance, SameSuit) {
+ test_helper::run_foundations_dominance_test(pol::SAME_SUIT, {
+ "AC","2C","3C","4C","AH","2H","3H","4H","AS","2S","3S","4S","AD",
+ "2D","3D","4D"});
+}
+
+TEST(FoundationsDominance, RedBlack) {
+ test_helper::run_foundations_dominance_test(pol::RED_BLACK, {
+ "AC","2C","AH","2H","AS","3H","2S","AD","3C","4H","3S","2D","4C",
+ "4S","3D","4D"});
+}
+
+TEST(FoundationsDominance, AnySuit) {
+ test_helper::run_foundations_dominance_test(pol::ANY_SUIT, {
+ "AC","2C","AH","2H","AS","2S","AD","3C","3H","3S","2D","4C","4H",
+ "4S","3D","4D"});
+}
+
+TEST(FoundationsDominance, NoSolutionChange) {
+ test_helper::optimisation_validity_test(
+ test_helper::optimisation::AUTO_FOUNDATION_MOVES);
+} \ No newline at end of file