inst/tinytest/test-replace.R

expect_error(replace())
expect_error(replace(replace_vector = "derp"))
expect_error(replace(replace_matrix = "derp"))
expect_error(replace(replace_vector = "derp", replace_matrix = "derp"))
expect_error(replace(replace_vector = function() {}, replace_matrix = "derp"))
expect_error(replace(replace_vector = "derp", replace_matrix = function() {}))
expect_error(replace(replace_vector = function() {}, replace_matrix = function() {}))
expect_error(replace(replace_vector = function(x) {}, replace_matrix = function(x) {}))
expect_error(replace(replace_vector = function(x, i) {}, replace_matrix = function(x, i) {}))
expect_error(replace(replace_vector = function(x, i, j) {}, replace_matrix = function(x, i, j) {}))
expect_equal(typeof(replace(replace_vector = function(x, i, j, value) {}, replace_matrix = function(x, i, j, value) {})), "closure")
expect_equal(typeof(replace(replace_vector = function(x, i, j, ..., value) {}, replace_matrix = function(x, i, j, ..., value) {})), "closure")

Try the crochet package in your browser

Any scripts or data that you put into this service are public.

crochet documentation built on July 8, 2020, 5:39 p.m.