Skip to content
Prev 5868 / 15274 Next

Tests for TTR, and similar, packages

On 03/25/2010 03:41 PM, Worik wrote:
There is documentation, which is quite extensive, and the references 
therein, and the code, and the examples.

Basically, the examples provide something of a regression suite, though 
I don't think they're set up with expected outputs in TTR as *formal* 
tests, as that was quite a pain in R package-land up until the 2.10.x 
series.  And TTR does indeed have several unit tests, which you can run, 
and examine, in the tests/ directory.
Well, the functions in TTR are used every day by hundreds, if not 
thousands of people and firms around the world.  That's not a guarantee, 
of course, but it is meaningful.  In such a widely used package, an 
awful lot of smart folks are thinking about the output of those 
functions.  Some of the lesser used stuff in the corners would 
undoubtedly benefit from more looking at (ALL code has bugs, even if 
only at the edges or with 'bad' inputs), but the main, popular, stuff is 
used a LOT.

Please share any tests you write, even (especially) simple ones or edge 
cases.  I'm sure Josh would be happy to include them for others to 
benefit from.

Regards,

    - Brian