File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,21 @@ capture.output(test_that("activated cache brings speedup on style_text() API on
9595 expect_true(first [" elapsed" ] / 2 > second [" elapsed" ])
9696}))
9797
98+
99+ capture.output(test_that(" no speedup when tranformer changes" , {
100+ skip_if_not_installed(" R.cache" )
101+ cache_activate(" testthat" )
102+ on.exit(clear_testthat_cache())
103+ clear_testthat_cache()
104+ cache_activate(" testthat" )
105+ t1 <- tidyverse_style()
106+ first <- system.time(style_text(text , transformers = t1 ))
107+ t1 $ use_raw_indention <- ! t1 $ use_raw_indention
108+ second <- system.time(style_text(text , transformers = t1 ))
109+ expect_false(first [" elapsed" ] / 2 > second [" elapsed" ])
110+ }))
111+
112+
98113capture.output(
99114 test_that(paste0(
100115 " activated cache brings speedup on style_text() API on " ,
You can’t perform that action at this time.
0 commit comments