summaryrefslogtreecommitdiff
path: root/Examples/test-suite/r/unittest.R
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/r/unittest.R')
-rw-r--r--Examples/test-suite/r/unittest.R9
1 files changed, 9 insertions, 0 deletions
diff --git a/Examples/test-suite/r/unittest.R b/Examples/test-suite/r/unittest.R
new file mode 100644
index 0000000..81c590a
--- /dev/null
+++ b/Examples/test-suite/r/unittest.R
@@ -0,0 +1,9 @@
+unittest <- function (x,y) {
+if (x==y) print("PASS")
+else print("FAIL")
+}
+
+unittesttol <- function(x,y,z) {
+if (abs(x-y) < z) print("PASS")
+else print("FAIL")
+} \ No newline at end of file