Skip to content

Commit 9bbe7b8

Browse files
committed
restore coverage
1 parent 78363b5 commit 9bbe7b8

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

tests/testthat/test-cube-residuals-zed-scores.R

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ test_that("compareDims() dimension validation", {
299299
})
300300

301301
test_that("compareDims() with MRs", {
302-
skip("Revive after specifying what expected MR behavior actually is")
303302
# if the dimension you are trying to compare amongst is an MR you get an
304303
# error (for now)
305304
expect_error(
@@ -314,25 +313,6 @@ test_that("compareDims() with MRs", {
314313
)
315314
)
316315

317-
# But if the MR is not the dimension being compared amongst, we still
318-
# calculate a score
319-
expected_zScores <- cubify(
320-
-1.34840705967846,
321-
-0.319502930145056,
322-
-2.44219465036739,
323-
-3.14883276639645,
324-
4.11744429667266,
325-
dims = list(
326-
food_groups = c("Vegetables"),
327-
nordics = c("Denmark", "Finland", "Iceland", "Norway", "Sweden")
328-
)
329-
)
330-
331-
expect_equal(
332-
compareRows(cat_by_mr_NSS_alltypes, baseline = "Fruit", x = "Vegetables"),
333-
expected_zScores
334-
)
335-
336316
expect_error(
337317
compareRows(
338318
mr_by_cat,

tests/testthat/test-cube-residuals.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ test_that("broadcast returns a matrix that mataches", {
3131
fixed = TRUE
3232
)
3333
})
34+
35+
test_that("scalars broadcast too", {
36+
array <- array(c(1,1), dim=c(1,2))
37+
expect_equal(broadcast(1, dim=c(1,2)), array)
38+
})

0 commit comments

Comments
 (0)