# tests/testthat/test_add_lines_x3p.R In x3ptools: Tools for Working with 3D Surface Measurements

```context("add_lines_x3p")

x3p_add_vline(xintercept = 3, size = 2, color = "black")
x3p_add_vline(xintercept = 3, size = 3, color = "black")

})

x3p_add_hline(yintercept = 3, size = 2, color = "black")
x3p_add_hline(yintercept = 3, size = 3, color = "black")

# This is how I expected it to work - why does the horizontal side work differently than the vertical side?

})

test_grid <- x3p_add_grid(x3pbig, spaces = 10)
cols <- c(rep(0, 4), rep(colmax, 17), 0, rep(colmax, 19), 0, rep(colmax, 9))
rows <- c(
0, rep(rowmax, 7), # I think this should probably be slightly different...
rep(c(0, rep(rowmax, 9)), times = 3),
0, rep(rowmax, 8),
rep(0, 3), rep(rowmax, 8),
rep(c(0, rep(rowmax, 9)), times = 3),
0, rep(rowmax, 7), rep(0, 5)
)

expect_equal(colSums(test_grid\$mask == "black"), rep(c(0, 3), c(4, 47)))
expect_equal(rowSums(test_grid\$mask == "black"), rep(c(0, 47, 0), c(47, 3, 51)))
expect_equal(colSums(test_grid\$mask == "darkred"), rep(c(101, 6), c(4, 47)))
expect_equal(rowSums(test_grid\$mask == "darkred"), rep(c(51, 4, 51), c(1, 95, 5)))

# check that length of size and color do not have to have the same lengths
test_grid_2 <- x3p_add_grid(x3pbig, spaces = 10, size=10)