Make R unittests pass failure to the Make system, otherwise failures are masked and won't be seen

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12431 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-02-04 23:40:06 +00:00
commit 1918e2a844

View file

@ -1,9 +1,17 @@
unittest <- function (x,y) {
if (x==y) print("PASS")
else print("FAIL")
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")
}
if (abs(x-y) < z) {
print("PASS")
} else {
print("FAIL")
stop("Test failed")
}
}