File: test-grid-utils.R

package info (click to toggle)
r-cran-ggplot2 3.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,748 kB
  • sloc: sh: 15; makefile: 5
file content (6 lines) | stat: -rw-r--r-- 156 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
test_that("width_cm and height_cm work with unit arithmetic", {
  x <- 2 * unit(1, "cm")

  expect_equal(width_cm(x), 2)
  expect_equal(height_cm(x), 2)
})