Skip to content

Commit 456269a

Browse files
committed
added test for cat domain check
1 parent 416f54b commit 456269a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/testthat/test-cat_domain.R

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
library(testthat)
2+
3+
context("categorical domain tests")
4+
5+
describe("infeasible", {
6+
it("detects infeasible rules with domain set", {
7+
v <- validator( a %in% c("a1", "a2"),
8+
a == "a1",
9+
a == "a2"
10+
)
11+
expect_true(is_infeasible(v))
12+
})
13+
14+
it("detects infeasible rules no domain set", {
15+
v <- validator( a == "a1",
16+
a == "a2"
17+
)
18+
expect_true(is_infeasible(v))
19+
})
20+
21+
})

0 commit comments

Comments
 (0)