Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/testthat/test-analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ test_that("norm agrees with integral", {
expect_equal(pl_integrate(pl, p = 2) ^ (1/2), pl_norm(pl, p = 2))
# 3-norm
expect_equal(pl_integrate(pl, p = 3) ^ (1/3), pl_norm(pl, p = 3))
# inf-norm?
# inf-norm
expect_equal(pl_vmax(pl_abs(pl)), pl_norm(pl, p = Inf))
})

# tinier example
Expand All @@ -29,7 +30,8 @@ test_that("distance agrees with integral of difference", {
expect_equal(pl_integrate(pl - pl2, p = 2)^(1/2), pl_distance(pl, pl2, p = 2))
# 3-norm
expect_equal(pl_integrate(pl - pl2, p = 3)^(1/3), pl_distance(pl, pl2, p = 3))
# inf-norm?
# inf-norm
expect_equal(pl_vmax(pl_abs(pl - pl2)), pl_distance(pl, pl2, p = Inf))
})

# TODO: example with non-nested levels