almost finished debug
[talweg.git] / pkg / tests / testthat / test.Forecaster.R
index e29f196..e776109 100644 (file)
@@ -12,6 +12,7 @@ pred_order = c(7,1:6) #will facilitate tests
 
 test_that("Average method behave as expected",
 {
+       browser()
        pred00_z = computeForecast(data00, indices, "Average", "Zero",        Inf, 24)
        pred00_p = computeForecast(data00, indices, "Average", "Persistence", Inf, 24)
        for (i in 1:7)
@@ -65,8 +66,10 @@ test_that("Persistence method behave as expected",
        expect_equal(pred13_dd$getSerie(7), c( rep(7,11), rep(8,13) ) )
 
        #Situation B: +Persistence, (generally) correct
-       pred00_sd = computeForecast(data00, indices, "Persistence", "Persistence", Inf, 24, same_day=TRUE)
-       pred00_dd = computeForecast(data00, indices, "Persistence", "Persistence", Inf, 24, same_day=FALSE)
+       pred00_sd = computeForecast(data00, indices, "Persistence", "Persistence", Inf, 24,
+               same_day=TRUE)
+       pred00_dd = computeForecast(data00, indices, "Persistence", "Persistence", Inf, 24,
+               same_day=FALSE)
        for (i in 3:7)
        {
                expect_equal(pred00_sd$getSerie(i), rep(i,24))
@@ -78,8 +81,10 @@ test_that("Persistence method behave as expected",
        expect_equal(pred00_sd$getSerie(2), rep(2,24) )
        expect_equal(pred00_dd$getSerie(2), rep(-5,24) )
 
-       pred13_sd = computeForecast(data13, indices, "Persistence", "Persistence", Inf, 24, same_day=TRUE)
-       pred13_dd = computeForecast(data13, indices, "Persistence", "Persistence", Inf, 24, same_day=FALSE)
+       pred13_sd = computeForecast(data13, indices, "Persistence", "Persistence", Inf, 24,
+               same_day=TRUE)
+       pred13_dd = computeForecast(data13, indices, "Persistence", "Persistence", Inf, 24,
+               same_day=FALSE)
        for (i in 2:6)
        {
                expect_equal(pred13_sd$getSerie(i), c( rep(i,11), rep(i%%7+1,13) ) )