Corrected the testing in unittest so that all elements of
a vector result are checked. Previously it was just the first element.
This commit is contained in:
parent
0821ec0b45
commit
5c2cd32795
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
unittest <- function (x,y) {
|
||||
if (x==y) {
|
||||
if (all(x==y)) {
|
||||
print("PASS")
|
||||
} else {
|
||||
print("FAIL")
|
||||
|
|
@ -8,7 +8,7 @@ unittest <- function (x,y) {
|
|||
}
|
||||
|
||||
unittesttol <- function(x,y,z) {
|
||||
if (abs(x-y) < z) {
|
||||
if (all(abs(x-y) < z)) {
|
||||
print("PASS")
|
||||
} else {
|
||||
print("FAIL")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue