TDD is BS?
Jacob Carlborg
doob at me.com
Thu Jun 20 02:17:34 PDT 2013
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
More information about the Digitalmars-d
mailing list