File: test_hasAttributes.R

package info (click to toggle)
r-cran-bbmisc 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,256 kB
  • sloc: ansic: 176; sh: 9; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 338 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
context("hasAttributes")

test_that("hasAttributes", {
  x = 1:10
  attribute.names = c("size", "importance")

  expect_false(hasAttributes(x, attribute.names))

  attr(x, "size") = length(x)
  expect_false(hasAttributes(x, attribute.names))

  attr(x, "importance") = "very important"
  expect_true(hasAttributes(x, attribute.names))
})