aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorCharlie Blake2018-03-21 11:03:00 +0000
committerGitHub2018-03-21 11:03:00 +0000
commit58118e89351e4c82fb1f54ebb021a1b0f9ba3ff8 (patch)
tree559310dd2c48ed7db6af82233c5bf185d234ee30 /src/test
parentMerge pull request #43 from thecharlesblake/shortest-solution (diff)
parentUpdate benchmark spider scaling for correct rules (diff)
downloadmetasol-58118e89351e4c82fb1f54ebb021a1b0f9ba3ff8.tar.gz
metasol-58118e89351e4c82fb1f54ebb021a1b0f9ba3ff8.zip

Merge pull request #44 from thecharlesblake/spider-fix

Spider fix

Diffstat (limited to 'src/test')
-rw-r--r--src/test/resources/spider/ComplexSolvable.json8
-rw-r--r--src/test/resources/spider/ComplexUnsolvable.json14
-rw-r--r--src/test/test_helper.cpp2
3 files changed, 12 insertions, 12 deletions
diff --git a/src/test/resources/spider/ComplexSolvable.json b/src/test/resources/spider/ComplexSolvable.json
index 3591805..c7d96e2 100644
--- a/src/test/resources/spider/ComplexSolvable.json
+++ b/src/test/resources/spider/ComplexSolvable.json
@@ -3,11 +3,11 @@
["2D","AD","3D"],
["AC","2C","3C"],
["AS","2S","3S"],
- ["AH","2H","3H"]
+ ["3H","2H","AH"]
],
"stock": [
- "2C","2D","2H","2S",
+ "2C","3D","3H","3S",
"AC","AD","AH","AS",
- "3C","3D","3H","3S"
+ "3C","2D","2H","2S"
]
-}
+} \ No newline at end of file
diff --git a/src/test/resources/spider/ComplexUnsolvable.json b/src/test/resources/spider/ComplexUnsolvable.json
index 8fce03d..2379c9a 100644
--- a/src/test/resources/spider/ComplexUnsolvable.json
+++ b/src/test/resources/spider/ComplexUnsolvable.json
@@ -1,13 +1,13 @@
{
"tableau piles": [
["2D","AD","3D"],
- ["AC","AC","3C"],
- ["AS","AS","3S"],
- ["AH","AH","3H"]
+ ["AC","2C","3C"],
+ ["AS","2S","3S"],
+ ["3H","2H","AH"]
],
"stock": [
- "2C","2D","2H","2S",
- "AC","2D","2H","2S",
- "3C","3D","3H","3S"
+ "3C","3D","3H","3S",
+ "2C","2D","AH","AS",
+ "AC","AD","2H","2S"
]
-}
+} \ No newline at end of file
diff --git a/src/test/test_helper.cpp b/src/test/test_helper.cpp
index da618d8..5dadeb3 100644
--- a/src/test/test_helper.cpp
+++ b/src/test/test_helper.cpp
@@ -23,7 +23,7 @@ bool test_helper::is_solvable(const std::string& input_file, const std::string&
game_state gs(rules, in_doc);
solver sol(gs);
- return sol.run();
+ return sol.run() == solver::sol_state::solved;
}
void test_helper::run_foundations_dominance_test(sol_rules::build_policy policy,