Re: how exactly to do unit testing in scheme...

2018-02-12 Thread Christopher Lam
Hi Robert and devel, Thank you for pointers, this is useful. The examples below illustrate how to test multiple items together. But I think the complexity of the 52(and counting) options (37 binary, the rest are multiples/multichoice) means, I think it'll be better to handwrite tests. I'll

Re: how exactly to do unit testing in scheme...

2018-01-30 Thread Robert Merkel
Sorry for the tardy response - I went away for the long weekend and was busy yesterday! As Phil says, you can test both leaf functions and controller code with unit tests. With controller code, you may need to write mocks for some or all of the called code. I don't know whether there are

Re: how exactly to do unit testing in scheme...

2018-01-28 Thread Christopher Lam
Thank you Phil, with help from IRC I'll be separating the renderer into multiple testable steps. Options to accountlist, to splits, to filtered splits, and finally to table. Each one uses different parts of options. On 26 Jan 2018 1:55 AM, "Phil Longstaff" wrote: >

Re: how exactly to do unit testing in scheme...

2018-01-25 Thread Phil Longstaff
Usually, unit testing controller code is done by writing mocks for the code that is called. In this case, this would be the options.scm controller and the renderer. The mock code would test that the expected arguments are passed, and would return a canned response. This both checks the logic of

how exactly to do unit testing in scheme...

2018-01-24 Thread Christopher Lam
Dear Devel To rgmerk: Welcome back, and it was a nice to meet irl! While simplifying transaction.scm and thinking of unit testing, I now have a conundrum worthy of an expert view. The reports require 2 main functions – the options generator and the renderer; the options generator generates a