check in comments?
Brought to you by:
burgerm
I have implemented a unit testing system in Logo (for my students).
The equivalent of the check... statements in RUnit is written as comments directly
as part of the source code. A master check procedure extracts all the check statments
(for a given set of functions) from the definitions and then runs them.
So in, would have
mysquare <- function(x){
# checkEqualsNumeric(mysquare(2),4)
return(x*x)
}
I think it is more convenient to write all the check statements as part of the definitions.
Could you consider adding such a mechanism to RUnit?