tests/testthat/test-breaks.R

test_that("vec_major_breaks returns the same as scales::extended_breaks()", {
  input <- 1:10
  expect_equal(vec_major_breaks(input),
               scales::extended_breaks()(input))
})

test_that("vec_minor_breaks returns the same as scales::regular_minor_breaks()", {
  input <- 1:10
  expect_equal(vec_minor_breaks(input, c(1, 5), 2),
               scales::regular_minor_breaks()(input, c(1, 5), 2))
})
teunbrand/ggvctrcoords documentation built on Jan. 12, 2020, 6:25 p.m.