Nothing
test_that(
"test.has_attributes.struct_with_attrs.returns_true_if_attr_exists",
{
x <- structure(list(a = 1), foo = 1, bar = 2)
attrs <- c("names", "foo", "bar", "baz", NA)
expected <- c(TRUE, TRUE, TRUE, FALSE, FALSE)
names(expected) <- attrs
class(expected) <- c("vector_with_cause", "logical")
# Note that base::attr treats missing attributes in the same way as
# non-existent attributes (i.e., it returns NULL). This should
# behave the same way.
assertive.base::cause(expected) <- c("", "", "", "no attr", "no attr")
expect_equal(
has_attributes(x, c("names", "foo", "bar", "baz", NA)),
expected
)
}
)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.