1
1
test_that(" caching utils make right blocks with semi-colon" , {
2
2
blocks_simple_uncached <- compute_parse_data_nested(c(" 1 + 1" , " 2; 1+1" )) %> %
3
- mutate (is_cached = FALSE ) %> %
3
+ base :: transform (is_cached = FALSE ) %> %
4
4
cache_find_block()
5
5
expect_equal(blocks_simple_uncached , c(1 , 1 , 1 , 1 ))
6
6
7
7
blocks_simple_cached <- compute_parse_data_nested(c(" 1 + 1" , " 2; 1+1" )) %> %
8
- mutate (is_cached = TRUE ) %> %
8
+ base :: transform (is_cached = TRUE ) %> %
9
9
cache_find_block()
10
10
expect_equal(blocks_simple_cached , c(1 , 1 , 1 , 1 ))
11
11
12
12
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 )) %> %
14
14
cache_find_block()
15
15
expect_equal(blocks_edge , c(1 , 2 , 2 , 2 ))
16
16
})
@@ -30,7 +30,7 @@ test_that("caching utils make right blocks with comments", {
30
30
31
31
32
32
blocks_simple_uncached <- compute_parse_data_nested(text ) %> %
33
- mutate (is_cached = c(
33
+ base :: transform (is_cached = c(
34
34
FALSE , FALSE , FALSE , FALSE , FALSE , FALSE , FALSE , TRUE , FALSE ,
35
35
TRUE , FALSE , FALSE , FALSE
36
36
)) %> %
@@ -48,7 +48,7 @@ test_that("caching utils make right blocks with comments", {
48
48
tau1 = 1 # here?
49
49
"
50
50
blocks_simple_cached <- compute_parse_data_nested(text ) %> %
51
- mutate (is_cached = c(
51
+ base :: transform (is_cached = c(
52
52
FALSE , FALSE , FALSE , FALSE , FALSE , TRUE , FALSE , FALSE , FALSE , FALSE
53
53
)) %> %
54
54
cache_find_block()
@@ -101,17 +101,17 @@ test_that("blank lines are correctly identified", {
101
101
102
102
test_that(" caching utils make right blocks with comments" , {
103
103
blocks_simple_uncached <- compute_parse_data_nested(c(" 1 + 1" , " 2 # comment" )) %> %
104
- mutate (is_cached = FALSE ) %> %
104
+ base :: transform (is_cached = FALSE ) %> %
105
105
cache_find_block()
106
106
expect_equal(blocks_simple_uncached , c(1 , 1 , 1 ))
107
107
108
108
blocks_simple_cached <- compute_parse_data_nested(c(" 1 + 1" , " 2 # comment2" )) %> %
109
- mutate (is_cached = TRUE ) %> %
109
+ base :: transform (is_cached = TRUE ) %> %
110
110
cache_find_block()
111
111
expect_equal(blocks_simple_cached , c(1 , 1 , 1 ))
112
112
113
113
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 )) %> %
115
115
cache_find_block()
116
116
expect_equal(blocks_edge , c(1 , 2 , 2 ))
117
117
})
0 commit comments