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:
parent
74883f1dd7
commit
1918e2a844
1 changed files with 13 additions and 5 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue