tests/testthat/test_type_helpers.R

context("Tests for type_helpers")

testthat::test_that(
	desc = "Testing add_wildcard",
	code = {
		expect_equal(add_wildcard("A", "R[B = 1] -> A", c("C", "D"), c("C", "R")),
		             "R[B = 1, C = . , R = . ] -> A")
		expect_equal(add_wildcard("A", "R[B = 1] -> A", c("C", "R"), c("C", "R")),
		             "A[C = . , R = . ]")
	}
)

Try the CausalQueries package in your browser

Any scripts or data that you put into this service are public.

CausalQueries documentation built on June 22, 2024, 6:50 p.m.