Start with a failing user acceptance test.
UAT is passing using TPP (NIL -> CONSTANT). Am I done? Probably not. I don't think this is a very useful app.
Refactor UAT while green. This sets me up for triangulation.
Begin using unit tests to drive the design. First unit test failing.
First 'Ones' test is failing. Max TPP used so far (SCALAR -> ARRAY).
Refactor into whole and fractional part. New test for the 'teen' amounts failing. TPP (EXPRESSION -> FUNCTION).
Tests for 'teens' passing. New test for 'tens' failing. TPP (EXPRESSION -> FUNCTION).
'Tens' tests now passing. Refactor of the cukes. New test for 'tens & ones' now failing. TPP (CONSTANT -> CONSTANT+)
'Tens & ones' now passing. New test for hundreds now failing. TPP (UNCONDITIONAL -> IF).
'hundreds' now passing. Got new ideas for the algorithm and seperation of concerns but will wait to implement 'thousands'. TPP (VARIABLE -> ASSIGNMENT)
'Tens of thousands' now passing. Taking a break to refactor.
This is not a great solution. I will tag this revision and start with a much simpler approach.
Small group parser that splits up the whole number into hundreds, thousands, etc.
Roughed out the new implementation. All tests passing. Refactor next.
Fixed a bug and further refactorings.
This is a solution. All tests passing.
Merge branch 'master' of https://github.com/gtempus/converter