tests/testthat/test_dimRedMethod-class.R

test_that("pars matching", {
    for (m in dimRedMethodList()) {
        mo <- getMethodObject(m)
        expect(
            all.equal(
                mo@stdpars,
                matchPars(mo, list())
            ),
            paste("par matching for", m, "failed")
        )
    }

    expect_warning(
      embed(iris[1:4], "PCA", asdf = 1234),
      "Parameter matching: asdf is not a standard parameter, ignoring."
    )
})
gdkrmr/dimRed documentation built on March 23, 2023, 5:44 a.m.