Debian Codegraph @

tests/testthat/test-distribute.R

raw
1 test_that("space distribution never removes space", {
2 # and distributes space from left to right based on need
3 expect_equal(
4 colonnade_distribute_space(c(5, 6, 6), c(11, 8, 8), 18),
5 c(0, 0, 0)
6 )
7
8 expect_equal(
9 colonnade_distribute_space(c(5, 6, 6), c(11, 8, 8), 19),
10 c(0, 0, 0)
11 )
12
13 expect_equal(
14 colonnade_distribute_space(c(5, 6, 6), c(11, 8, 8), 20),
15 c(1, 0, 0)
16 )
17
18 expect_equal(
19 colonnade_distribute_space(c(5, 6, 6), c(11, 8, 8), 21),
20 c(2, 0, 0)
21 )
22
23 expect_equal(
24 colonnade_distribute_space(c(5, 6, 6), c(11, 8, 8), 22),
25 c(2, 1, 0)
26 )
27 })