Skip to content

Commit 43bd614

Browse files
committed
2 parents e482446 + d41b43d commit 43bd614

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

pkg/inst/tinytest/test_tiny.R

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,17 @@ expect_equal(women, dat)
6262
expect_warning(warning("foo"))
6363
expect_error(stop("bar"))
6464

65-
# class of error condition
66-
ec <- errorCondition(message="wa babalooba", class="foo")
67-
expect_false(ignore(expect_error)( stop(ec), class="bar" ))
68-
expect_true (ignore(expect_error)( stop(ec), class="foo" ))
69-
70-
# class of warning condition
71-
wc <- warningCondition(message="ba la bamboo", class="foo")
72-
expect_false(ignore(expect_warning)( warning(wc), class="bar"))
73-
expect_true (ignore(expect_warning)( warning(wc), class="foo"))
65+
if (getRversion() >= "3.6.0") {
66+
# class of error condition
67+
ec <- errorCondition(message="wa babalooba", class="foo")
68+
expect_false(ignore(expect_error)( stop(ec), class="bar"))
69+
expect_true (ignore(expect_error)( stop(ec), class="foo"))
70+
71+
# class of warning condition
72+
wc <- warningCondition(message="ba la bamboo", class="foo")
73+
expect_false(ignore(expect_warning)( warning(wc), class="bar"))
74+
expect_true (ignore(expect_warning)( warning(wc), class="foo"))
75+
}
7476

7577
# messages to stdout
7678
expect_stdout(print("hihi"))

0 commit comments

Comments
 (0)