Skip to content

Commit bd67a11

Browse files
Add tests for helpers.
1 parent cfca5f7 commit bd67a11

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/testthat/test-helpers.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
context("various helpers")
2+
3+
test_that("can construct vertical", {
4+
expect_error(construct_vertical(c("1 + 1", "nw")), NA)
5+
})
6+
7+
test_that("can lookup tokens", {
8+
expect_error(lookup_new_special(), NA)
9+
})
10+
11+
test_that("can extend non-comment", {
12+
pd <- compute_parse_data_nested(c("if (TRUE) # \n call(34)"))
13+
expect_equal(extend_if_comment(pd$child[[1]], 4), 5)
14+
})

0 commit comments

Comments
 (0)