Nothing
context("Return")
test_that("returns work well", {
f <- function() {
g <- function() {
"foo"
return()
"bar"
}
}
expect_equal(cyclocomp(f), 2)
f <- function() {
g <- function() {
"foo"
"bar"
}
}
expect_equal(cyclocomp(f), 1)
f <- function() {
return()
}
expect_equal(cyclocomp(f), 1)
f <- function() {
g <- function() {
"foo"
"bar"
}
return()
}
expect_equal(cyclocomp(f), 1)
f <- function() {
g <- function() {
"foo"
"bar"
return("ok")
}
}
expect_equal(cyclocomp(f), 1)
f <- function() { return(); 1; }
expect_equal(cyclocomp(f), 2)
})
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.