implement SudokuSolver.checkRegionPlacement() method and write unit tests

This commit is contained in:
StevanFreeborn committed 2022-05-22 23:55:59 -05:00
1 parent 2d815af9b8
commit f99db6a4a5
2 files changed
+132 -6

No files matched your search

+24
View File
@@ -82,5 +82,29 @@ suite('UnitTests', () => {
});
test('checkRegionPlacement(puzzleString, row, column, value) valid region placement', (done) => {
const input = puzzlesAndSolutions[0][0];
const row = 'A';
const column = '2';
const value = '4';
assert.equal(solver.checkRegionPlacement(input, row, column, value), true);
done();
});
test('checkRegionPlacement(puzzleString, row, column, value) invalid region placement', (done) => {
const input = puzzlesAndSolutions[0][0];
const row = 'A';
const column = '2';
const value = '2';
assert.equal(solver.checkRegionPlacement(input, row, column, value), false);
done();
});
});