Files
cpp-thirdparty/winx64/bin/swig-3.0.12/Examples/test-suite/r/unittest.R
Bassem Girgis 81b4b9e273 Initial commit
2018-12-20 17:34:07 -06:00

18 lines
265 B
R

unittest <- function (x,y) {
if (all(x==y)) {
print("PASS")
} else {
print("FAIL")
stop("Test failed")
}
}
unittesttol <- function(x,y,z) {
if (all(abs(x-y) < z)) {
print("PASS")
} else {
print("FAIL")
stop("Test failed")
}
}