/trunk/Examples/test-suite/r/unittest.R
R | 17 lines | 16 code | 1 blank | 0 comment | 4 complexity | 6ef588ea07bd9118136d3fbabe80d4fd MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- unittest <- function (x,y) {
- if (x==y) {
- print("PASS")
- } else {
- print("FAIL")
- stop("Test failed")
- }
- }
- unittesttol <- function(x,y,z) {
- if (abs(x-y) < z) {
- print("PASS")
- } else {
- print("FAIL")
- stop("Test failed")
- }
- }