How do I write customized unit tests in R?

73 Views Asked by At

I am using the tinytest package for unit testing and wanted to modify some of the tests which did not work out. To boil down the problem I give the following example. I define a new function

expect_equal_new <- function(a,b){expect_equal(a,b)}

If I put expect_equal_new and expect_equal in a test file and run test_all() from the tinytest package, only the result of expect_equal appears in the summary. Why is that the case? Is there a way that test_all() also finds expect_equal_new?

0

There are 0 best solutions below