Skip to content

Commit

Permalink
use comparison expectations for better failure messages
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Nov 10, 2023
1 parent e7d99ad commit 9a81e70
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-get_cam_op.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,10 @@ test_that("daily effort is > 0 and < 1 for partial active days (start/end)", {
location <- mica$data$deployments$locationName[4]
start <- as.character(as.Date(mica$data$deployments$start[4]))
end <- as.character(as.Date(mica$data$deployments$end[4]))
expect_true(cam_op_matrix[4, start] > 0)
expect_true(cam_op_matrix[4, start] < 1)
expect_true(cam_op_matrix[4, end] > 0)
expect_true(cam_op_matrix[4, end] < 1)
expect_gt(cam_op_matrix[4, start], 0)
expect_lt(cam_op_matrix[4, start],1)
expect_gt(cam_op_matrix[4, end], 0)
expect_lt(cam_op_matrix[4, end], 1)
})

test_that(
Expand All @@ -283,8 +283,8 @@ test_that(
expect_true(
nrow(cam_op_matrix) == length(unique(mica1$data$deployments$locationName))
)
expect_true(cam_op_matrix[1, first_full_day_two_deps] > 1)
expect_true(cam_op_matrix[1, last_full_day_two_deps] > 1)
expect_gt(cam_op_matrix[1, first_full_day_two_deps], 1)
expect_gt(cam_op_matrix[1, last_full_day_two_deps], 1)
}
)

Expand Down

0 comments on commit 9a81e70

Please sign in to comment.