[Robast-commits] r518 - branches/robast-0.9/pkg/RobExtremes/tests/TestSuite

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 12 17:32:35 CEST 2012


Author: horbenko
Date: 2012-09-12 17:32:35 +0200 (Wed, 12 Sep 2012)
New Revision: 518

Modified:
   branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R
Log:
Tests for RobExtremes

Modified: branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R	2012-09-12 15:31:02 UTC (rev 517)
+++ branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R	2012-09-12 15:32:35 UTC (rev 518)
@@ -6,20 +6,39 @@
 
 
  .setUp()
- {
-  test.expectationPareto = function(){
-   X = Pareto(shape=1,Min=1)
-   expectation.Pareto = E(X)
-   checkEquals(expectation.Pareto, Inf)
+ {  
+   ##expectation of Pareto distributed random variable
+   expectation.Pareto = function(shape0=1,Min0=1){
+    X = Pareto(shape=shape0,Min=Min0)
+    expectation.Pareto = E(X)  
    }
-  }
 
+   test.expectationPareto = function(){
+    checkEquals(expectation.Pareto(1,1), Inf)
+   }    
+  
+  test.HTMLInfo.Pareto = function(){
+   track <- tracker()
+   ## initialize the tracker
+   track$init()
+ 
+   ## inspect the function
+   resFoo <- inspect(expectation.Pareto(1,1), track = track)
+   ## get the tracked function call info for all inspect calls
+   resTrack <- track$getTrackInfo()
+   }
+
+ }
+
  .tearDown()
  {
+  ## create HTML sites in folder ./results for all inspect calls
+  printHTML.trackInfo(resTrack,"TestSuite/TestExpectation")
+
   }
 
 #  
-# 
+# Beispiele
 # .setUp()
 # {
 # test.checkFunctions1 = function(){



More information about the Robast-commits mailing list