@@ -15,7 +15,7 @@ expect_compilation <- function(mod, ...) {
1515 if (length(mod $ exe_file()) == 0 || ! file.exists(mod $ exe_file())) {
1616 fail(sprint(" Model executable '%s' does not exist after compilation." , mod $ exe_file()))
1717 }
18- if (! is.null(before_mtime ) && mtime_check_enabled ) {
18+ if (! is.null(before_mtime )) {
1919 after_mtime <- file.mtime(mod $ exe_file())
2020 expect_gt(
2121 after_mtime ,
@@ -135,43 +135,3 @@ expect_equal_ignore_order <- function(object, expected, ...) {
135135}
136136
137137expect_not_true <- function (... ) expect_false(isTRUE(... ))
138-
139- transform_print_snapshot <- function (x ) {
140- vapply(x , function (line ) {
141- line <- trimws(line )
142- if (! nzchar(line )) {
143- return (line )
144- }
145- if (grepl(" ^variable\\ b" , line )) {
146- return (gsub(" \\ s+" , " " , line ))
147- }
148- if (grepl(" ^# showing" , line ) ||
149- grepl(" ^Can't find the following variable\\ (s\\ ):" , line )) {
150- return (line )
151- }
152- sub(" \\ s+.*$" , " " , line )
153- }, character (1 ))
154- }
155-
156- transform_unix_toolchain_snapshot <- function (x ) {
157- x <- gsub(" A suitable C\\ +\\ + compiler was not found\\ ..*" , " C++ compiler missing." , x )
158- x <- gsub(" A C\\ +\\ + compiler was not found\\ ..*" , " C++ compiler missing." , x )
159- gsub(" The 'make' tool was not found\\ ..*" , " make missing." , x )
160- }
161-
162- transform_r_version_snapshot <- function (x ) {
163- x <- gsub(" Rtools[0-9]+" , " Rtools<version>" , x )
164- gsub(" R version [0-9]+\\ .[0-9]+\\ .[0-9]+" , " R version <version>" , x )
165- }
166-
167- capture_print_snapshot <- function (code ) {
168- code <- substitute(code )
169- value <- NULL
170- lines <- utils :: capture.output(
171- value <- rlang :: eval_bare(code , parent.frame())
172- )
173- list (
174- value = value ,
175- lines = transform_print_snapshot(lines )
176- )
177- }
0 commit comments