File: test_suppressAll.R

package info (click to toggle)
r-cran-bbmisc 1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,156 kB
  • ctags: 13
  • sloc: ansic: 152; sh: 9; makefile: 3
file content (17 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

context("suppressAll")

test_that("suppressAll", {
  expect_equal(suppressAll(123), 123)
  expect_true(prints_text("123")({print(123);0})$passed)
  expect_false(prints_text("123")(suppressAll({print(123);0}))$passed)
  
  #todo: do later when testhat is fixed
  expect_true(gives_warning("123")({warning(123);0})$passed)
  #expect_false(gives_warning("123")(suppressAll({warning(123);0}))$passed)

  #todo: do later when testhat is fixed
  expect_true(shows_message("123")({message(123);0})$passed)
  #expect_false(shows_message("123")(suppressAll({message(123);0}))$passed)
})