[Returnanalytics-commits] r3746 - pkg/Dowd/tests/testthat

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 26 20:45:08 CEST 2015


Author: dacharya
Date: 2015-06-26 20:45:08 +0200 (Fri, 26 Jun 2015)
New Revision: 3746

Added:
   pkg/Dowd/tests/testthat/testFrechetES.R
Log:
Test for FrechetES.

Added: pkg/Dowd/tests/testthat/testFrechetES.R
===================================================================
--- pkg/Dowd/tests/testthat/testFrechetES.R	                        (rev 0)
+++ pkg/Dowd/tests/testthat/testFrechetES.R	2015-06-26 18:45:08 UTC (rev 3746)
@@ -0,0 +1,8 @@
+test_that("Frechet ES.",{
+  # Success - 1
+  expect_equal(as.matrix(623.485), FrechetES(3.5, 2.3, 1.6, 10, .95, 30), tolerance=0.01)
+  
+  # Success - 2
+  expect_equal(as.matrix(0.1514), FrechetES(-1.3, 1.2, .2, 10, .9, 280), tolerance=0.01)
+  
+})
\ No newline at end of file



More information about the Returnanalytics-commits mailing list