Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fikovnik committed Sep 14, 2024
1 parent 48031ea commit 0f2dae0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions client/rsh/R/rsh.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ rsh_compile <- function(f, options) {
options$name <- as.character(substitute(f))
}

if (is.null(options$inplace)) {
options$inplace <- TRUE
}

invisible(.Call(C_compile, f, options))
}

Expand Down
14 changes: 7 additions & 7 deletions client/rsh/tests/test-remote-compilation.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# f <- function() {
# 42
# }
#
# rsh::rsh_compile(f)
# stopifnot(rsh::is_compiled(f))
# stopifnot(f() == 42)
f <- function() {
42
}

rsh::rsh_compile(f)
stopifnot(rsh::is_compiled(f))
stopifnot(f() == 42)

0 comments on commit 0f2dae0

Please sign in to comment.