Skip to content

Commit

Permalink
add basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
advieser committed Dec 17, 2024
1 parent e88768f commit b105386
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testthat/test_check_operators.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
test_that("check operators", {
# AND operator
expect_true(TRUE %check&&% TRUE)
expect_error(TRUE %check&&% "error", "error")
expect_error("error" %check&&% TRUE, "error")
expect_error("error1" %check&&% "error2", "error1 and error2")

expect_true(TRUE %check||% TRUE)
expect_true(TRUE %check||% "error")
expect_true("error" %check||% TRUE)
expect_error("error1" %check||% "error2", "error1 or error2")

})

0 comments on commit b105386

Please sign in to comment.