# NOT RUN {
ver <- gdtools::version_freetype()
if (ver >= "2.6.0") {
disp_hist_base <- function() hist(mtcars$disp)
expect_doppelganger("disp-histogram-base", disp_hist_base)
}
if (ver >= "2.6.0" && requireNamespace("ggplot2", quietly = TRUE)) {
library("ggplot2")
disp_hist_ggplot <- ggplot(mtcars, aes(disp)) + geom_histogram()
expect_doppelganger("disp-histogram-ggplot", disp_hist_ggplot)
}
# }
Run the code above in your browser using DataCamp Workspace