tests/testthat/test-utils.R

if (!.Call(`_rxode2_isIntel`)) {
  test_that(".matchesLangTemplate", {
    expect_false(.matchesLangTemplate(str2lang("d/dt(foo)"), str2lang("d/foo(.name)")))
    # . matches anything
    expect_true(.matchesLangTemplate(str2lang("'foo'"), str2lang(".")))
    # .name matches any name
    expect_true(.matchesLangTemplate(str2lang("d/dt(foo)"), str2lang("d/dt(.name)")))
    # .call() matches any call but it must be given as a call (and not a name)
    expect_true(.matchesLangTemplate(str2lang("d/(foo)"), str2lang("d/.call()")))
    expect_false(.matchesLangTemplate(str2lang("d/(foo)"), str2lang("d/.call")))
  })
}
nlmixr2/rxode2 documentation built on Jan. 11, 2025, 8:48 a.m.