Expectation predicate for testing that a vector is fully contained within another vector
expect_in(current, target, ..., info = NA_character_)A tinytest object. A tinytest object is a
logical with attributes holding information about the
test that was run
testthat equivalent:
testthat::expect_in()
Other in-condition expectation predicates:
expect_contains(),
expect_mapequal(),
expect_setequal()
expect_in(letters, target = rev(letters)) # Pass
#> ----- PASSED : <-->
#> call| expect_in(letters, target = rev(letters))
expect_in(letters, target = "b") # Fail
#> ----- FAILED[xcpt]: <-->
#> call| expect_in(letters, target = "b")
#> diff| Expected all values of 'current' to be in 'target'
expect_in("b", target = letters) # Pass
#> ----- PASSED : <-->
#> call| expect_in("b", target = letters)