diff options
author | David Phillips <david@sighup.nz> | 2019-03-16 22:03:09 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-03-16 22:03:09 +1300 |
commit | c4db7474ffb3454894bc59010e64e3f335fcfa3d (patch) | |
tree | 9972b7c0e934307a8eb4c0135f808e3e990bcc9a /test | |
parent | 53e40ead2dc29deaff619803d1aa57812b2920fc (diff) | |
download | sudoku-c4db7474ffb3454894bc59010e64e3f335fcfa3d.tar.xz |
Don't be strict about solutions
If expected.sku exists, check that the solution matches it, otherwise,
just rely on the solution having been some unknown solution, so long
as it did not modify the pre-set tiles for the problem, and is a valid
and complete sudoku board. This opens up the possibility for testing
multi-solution puzzles.
Diffstat (limited to 'test')
-rw-r--r-- | test/004-easy/expected.sku | 11 | ||||
-rw-r--r-- | test/004-easy/in.sku | 11 | ||||
-rw-r--r-- | test/100-medium/expected.sku | 13 | ||||
-rw-r--r-- | test/100-medium/in.sku | 18 |
4 files changed, 31 insertions, 22 deletions
diff --git a/test/004-easy/expected.sku b/test/004-easy/expected.sku new file mode 100644 index 0000000..cb0dea7 --- /dev/null +++ b/test/004-easy/expected.sku @@ -0,0 +1,11 @@ +415|789|362 +382|465|197 +967|132|485 + +153|674|829 +278|951|643 +694|328|571 + +721|546|938 +536|897|214 +849|213|756 diff --git a/test/004-easy/in.sku b/test/004-easy/in.sku new file mode 100644 index 0000000..8fc1bdc --- /dev/null +++ b/test/004-easy/in.sku @@ -0,0 +1,11 @@ +???|?89|?6?| +3??|??5|1?7| +96?|?3?|4?5| + +15?|6??|???| +??8|9?1|6??| +???|??8|?71| + +7?1|?4?|?38| +5?6|8??|??4| +?4?|21?|???| diff --git a/test/100-medium/expected.sku b/test/100-medium/expected.sku deleted file mode 100644 index a81eebf..0000000 --- a/test/100-medium/expected.sku +++ /dev/null @@ -1,13 +0,0 @@ -?6??5?32? -?9??4?6?? -7?36?8??? - -1???7?98? -6???????2 -?39?8???1 - -???5?48?7 -??4?3??1? -?78?6??9? - -Needs updating with solution - currently solver cannot solve diff --git a/test/100-medium/in.sku b/test/100-medium/in.sku index 03f1055..d4f0032 100644 --- a/test/100-medium/in.sku +++ b/test/100-medium/in.sku @@ -1,11 +1,11 @@ -?6??5?32? -?9??4?6?? -7?36?8??? +?6?|?5?|32?| +?9?|?4?|6??| +7?3|6?8|???| -1???7?98? -6???????2 -?39?8???1 +1??|?7?|98?| +6??|???|??2| +?39|?8?|??1| -???5?48?7 -??4?3??1? -?78?6??9? +???|5?4|8?7| +??4|?3?|?1?| +?78|?6?|?9?| |