1context("stat_hex") 2 3test_that("can use length 1 binwidth", { 4 df <- data_frame(x = c(1, 1, 2), y = c(1, 1, 2)) 5 p <- ggplot(df, aes(x, y)) + stat_binhex(binwidth = 1) 6 7 expect_equal(nrow(layer_data(p)), 2) 8}) 9