tests/testthat/test-geom_smith.R

library(ggplot2)
library(rftk)

test_that("geom_smith - invalid aes", {
  
  expect_error(ggplot_build(ggplot(dipole, 
  																 aes()) + 
  														geom_smith()),
  						 regexp = "missing aesthetics")
  expect_silent(ggplot_build(ggplot(dipole, 
  																	aes(freq = frequency, 
  																			smag = mag, 
  																			sang = ang * pi / 180)) +
  													 	geom_smith()))
	
})
aaronmanderson3/rftk documentation built on July 30, 2023, 1:19 p.m.