Commit 5859baed authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

style(test): use a lower case to write the exponant values i order to homogenize the code

Showing with 2 additions and 2 deletions
+2 -2
...@@ -181,7 +181,7 @@ Qm3GR4Only <- OutputsGR4JOnly$Qsim * InputsModel$BasinAreas[2L] * 1e3 ...@@ -181,7 +181,7 @@ Qm3GR4Only <- OutputsGR4JOnly$Qsim * InputsModel$BasinAreas[2L] * 1e3
test_that("1 input with lag of 1 time step delay out gives an output delayed of one time step", { test_that("1 input with lag of 1 time step delay out gives an output delayed of one time step", {
OutputsSD <- RunModel(InputsModel, RunOptions, Param = ParamSD, FUN_MOD = RunModel_GR4J) OutputsSD <- RunModel(InputsModel, RunOptions, Param = ParamSD, FUN_MOD = RunModel_GR4J)
Qm3SdSim <- OutputsSD$Qsim_m3 Qm3SdSim <- OutputsSD$Qsim_m3
Qm3UpstLagObs <- c(0, Qupstream[Ind_Run[1:(length(Ind_Run) - 1)]]) * InputsModel$BasinAreas[1] * 1E3 Qm3UpstLagObs <- c(0, Qupstream[Ind_Run[1:(length(Ind_Run) - 1)]]) * InputsModel$BasinAreas[1] * 1e3
expect_equal(Qm3SdSim - Qm3GR4Only, Qm3UpstLagObs) expect_equal(Qm3SdSim - Qm3GR4Only, Qm3UpstLagObs)
}) })
...@@ -190,7 +190,7 @@ test_that("1 input with lag of 0.5 time step delay out gives an output delayed o ...@@ -190,7 +190,7 @@ test_that("1 input with lag of 0.5 time step delay out gives an output delayed o
Param = c(InputsModel$LengthHydro * 1e3 / (12 * 3600), Param), Param = c(InputsModel$LengthHydro * 1e3 / (12 * 3600), Param),
FUN_MOD = RunModel_GR4J) FUN_MOD = RunModel_GR4J)
Qm3SdSim <- OutputsSD$Qsim_m3 Qm3SdSim <- OutputsSD$Qsim_m3
Qm3UpstLagObs <- (Qupstream[Ind_Run] + c(0, Qupstream[Ind_Run[1:(length(Ind_Run) - 1)]]))/2 * InputsModel$BasinAreas[1] * 1E3 Qm3UpstLagObs <- (Qupstream[Ind_Run] + c(0, Qupstream[Ind_Run[1:(length(Ind_Run) - 1)]])) / 2 * InputsModel$BasinAreas[1] * 1e3
expect_equal(Qm3SdSim - Qm3GR4Only, Qm3UpstLagObs) expect_equal(Qm3SdSim - Qm3GR4Only, Qm3UpstLagObs)
}) })
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment