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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 25 00:24:19 CEST 2015


Author: dacharya
Date: 2015-06-25 00:24:18 +0200 (Thu, 25 Jun 2015)
New Revision: 3743

Added:
   pkg/Dowd/tests/testthat/testCdfOfSumUsingGumbelCopula.R
Log:
Test for CdfOfSumUsingGumbelCopula.

Added: pkg/Dowd/tests/testthat/testCdfOfSumUsingGumbelCopula.R
===================================================================
--- pkg/Dowd/tests/testthat/testCdfOfSumUsingGumbelCopula.R	                        (rev 0)
+++ pkg/Dowd/tests/testthat/testCdfOfSumUsingGumbelCopula.R	2015-06-24 22:24:18 UTC (rev 3743)
@@ -0,0 +1,10 @@
+test_that("Cdf Of Sum Using Gumbel Copula.",{
+  # Success - 1
+  expect_equal(0.0259, CdfOfSumUsingGumbelCopula(0.1, 1.3, 2.5, 1.2, 1.5, 1.2), tolerance=0.001)
+  
+  # Success - 2
+  expect_equal(0.8896, CdfOfSumUsingGumbelCopula(0.1, 1.5, -2.5, 0.4, 5.1, 2.1), tolerance=0.001)
+  
+  # Error - 1
+  expect_error(val <- CdfOfSumUsingGumbelCopula(0.1, 1.5, -2.5, 0.4, 5.1, .9))
+})


Property changes on: pkg/Dowd/tests/testthat/testCdfOfSumUsingGumbelCopula.R
___________________________________________________________________
Added: svn:executable
   + *



More information about the Returnanalytics-commits mailing list