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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 18 10:17:15 CEST 2012


Author: horbenko
Date: 2012-09-18 10:17:15 +0200 (Tue, 18 Sep 2012)
New Revision: 520

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


Modified: branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R	2012-09-12 18:01:54 UTC (rev 519)
+++ branches/robast-0.9/pkg/RobExtremes/tests/TestSuite/TestExpectation.R	2012-09-18 08:17:15 UTC (rev 520)
@@ -4,39 +4,42 @@
 ##                                      ##
 ##########################################
 
+# .setUp(), .tearDown(): Either one or both functions have to be provided by the test case
+#author, take precedence over the dummy definitions provided by the
+#RUnit package and are called once for every test case identified.
 
  .setUp()
  {  
    ##expectation of Pareto distributed random variable
    expectation.Pareto = function(shape0=1,Min0=1){
     X = Pareto(shape=shape0,Min=Min0)
-    expectation.Pareto = E(X)  
+    return(E(X))  
    }
 
    test.expectationPareto = function(){
     checkEquals(expectation.Pareto(1,1), Inf)
-   }    
+    checkEquals(expectation.Pareto(2,1), 0)
+     }    
   
-  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()
-   }
+#   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")
+#   }
 
- .tearDown()
- {
-  ## create HTML sites in folder ./results for all inspect calls
-  printHTML.trackInfo(resTrack,"TestSuite/TestExpectation")
 
-  }
-
 #  
 # Beispiele
 # .setUp()



More information about the Robast-commits mailing list