Skip to content

Commit 757a4f3

Browse files
committed
view_info test.
1 parent df9638e commit 757a4f3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/testthat/tests-view_par.R

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@ test_that("par within view", {
1616
expect_equal(gs[[2]]$window$par$las, 1)
1717

1818
})
19+
20+
test_that("view_info", {
21+
22+
gs = points(gsplot(), y=1, x=2, col="blue", pch=18, las=3) %>% lines(2:3,4:5) %>% points(3,4,side=c(3,4),las=1)
23+
view.information <- view_info(gs)
24+
expect_equal(nrow(view.information), 2)
25+
expect_equal(view.information$log, c("",""))
26+
27+
usrDef <- gsplot(mar=c(4,4,4,4)) %>%
28+
points(x=1, y=2, side=c(3,2), cex=3, xlab='cat',log='x') %>%
29+
points(x=3:10,y=4:11, side=c(1,2), log='y')
30+
31+
view.information <- view_info(usrDef)
32+
expect_equal(nrow(view.information), 2)
33+
expect_equal(view.information$log, c("yx","y"))
34+
35+
})

0 commit comments

Comments
 (0)