File: test-NWGL.R

package info (click to toggle)
r-cran-polycub 0.5-2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 340 kB
  • ctags: 2
  • sloc: ansic: 54; sh: 8; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10

context("Validation of cached Gauss-Legendre nodes/weights")

if (requireNamespace("statmod")) {
    test_that("statmod::gauss.quad() still gives the same result", {
        new.NWGL <- lapply(seq_len(61L), function (n)
                           unname(statmod::gauss.quad(n = n, kind = "legendre")))
        expect_that(new.NWGL, equals(.NWGL, check.attributes = FALSE))
    })
}