File: test-stat-qq.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 (11 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
test_that("error is thrown with wrong quantile input", {
  # Stat errors are converted to warnings
  p <- ggplot(mtcars, aes(sample = mpg)) + stat_qq(quantiles = 1:5)
  expect_snapshot_warning(ggplot_build(p))

  p <- ggplot(mtcars, aes(sample = mpg)) + geom_qq_line(quantiles = 1:5)
  expect_snapshot_warning(ggplot_build(p))

  p <- ggplot(mtcars, aes(sample = mpg)) + geom_qq_line(line.p = 0.15)
  expect_snapshot_warning(ggplot_build(p))
})