11test_that(" caching utils make right blocks with semi-colon" , {
22 blocks_simple_uncached <- compute_parse_data_nested(c(" 1 + 1" , " 2; 1+1" )) %> %
3- mutate (is_cached = FALSE ) %> %
3+ base :: transform (is_cached = FALSE ) %> %
44 cache_find_block()
55 expect_equal(blocks_simple_uncached , c(1 , 1 , 1 , 1 ))
66
77 blocks_simple_cached <- compute_parse_data_nested(c(" 1 + 1" , " 2; 1+1" )) %> %
8- mutate (is_cached = TRUE ) %> %
8+ base :: transform (is_cached = TRUE ) %> %
99 cache_find_block()
1010 expect_equal(blocks_simple_cached , c(1 , 1 , 1 , 1 ))
1111
1212 blocks_edge <- compute_parse_data_nested(c(" 1 + 1" , " 2; 1+1" )) %> %
13- mutate (is_cached = c(TRUE , TRUE , FALSE , FALSE )) %> %
13+ base :: transform (is_cached = c(TRUE , TRUE , FALSE , FALSE )) %> %
1414 cache_find_block()
1515 expect_equal(blocks_edge , c(1 , 2 , 2 , 2 ))
1616})
@@ -30,7 +30,7 @@ test_that("caching utils make right blocks with comments", {
3030
3131
3232 blocks_simple_uncached <- compute_parse_data_nested(text ) %> %
33- mutate (is_cached = c(
33+ base :: transform (is_cached = c(
3434 FALSE , FALSE , FALSE , FALSE , FALSE , FALSE , FALSE , TRUE , FALSE ,
3535 TRUE , FALSE , FALSE , FALSE
3636 )) %> %
@@ -48,7 +48,7 @@ test_that("caching utils make right blocks with comments", {
4848 tau1 = 1 # here?
4949 "
5050 blocks_simple_cached <- compute_parse_data_nested(text ) %> %
51- mutate (is_cached = c(
51+ base :: transform (is_cached = c(
5252 FALSE , FALSE , FALSE , FALSE , FALSE , TRUE , FALSE , FALSE , FALSE , FALSE
5353 )) %> %
5454 cache_find_block()
@@ -101,17 +101,17 @@ test_that("blank lines are correctly identified", {
101101
102102test_that(" caching utils make right blocks with comments" , {
103103 blocks_simple_uncached <- compute_parse_data_nested(c(" 1 + 1" , " 2 # comment" )) %> %
104- mutate (is_cached = FALSE ) %> %
104+ base :: transform (is_cached = FALSE ) %> %
105105 cache_find_block()
106106 expect_equal(blocks_simple_uncached , c(1 , 1 , 1 ))
107107
108108 blocks_simple_cached <- compute_parse_data_nested(c(" 1 + 1" , " 2 # comment2" )) %> %
109- mutate (is_cached = TRUE ) %> %
109+ base :: transform (is_cached = TRUE ) %> %
110110 cache_find_block()
111111 expect_equal(blocks_simple_cached , c(1 , 1 , 1 ))
112112
113113 blocks_edge <- compute_parse_data_nested(c(" 1 + 1" , " 2 # 1+1" )) %> %
114- mutate (is_cached = c(TRUE , TRUE , FALSE )) %> %
114+ base :: transform (is_cached = c(TRUE , TRUE , FALSE )) %> %
115115 cache_find_block()
116116 expect_equal(blocks_edge , c(1 , 2 , 2 ))
117117})
0 commit comments