On 2013-06-19 23:19, H. S. Teoh wrote:

How do you write a test that covers "enough" cases for a sudoku solver?

I don't know.

I you're about to create a sum function and use TDD.

1. Create the test:

auto result = sum(1, 2);
assert(result == 3);

2. Implement:

int sum (int a, int b) { return 3; }

In the above case you obviously haven't enough cases in your test to assert that your implementation does what it supposed to do. This example is very simple compared to sudoku.

--
/Jacob Carlborg

Reply via email to