Skip to content

Commit

Permalink
Avoid relying on type stability in sum()
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 4, 2023
1 parent c963d4d commit e10b1dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-summarise.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ test_that("assigning with `<-` doesn't affect the mask (#6666)", {
})

test_that("summarise() correctly auto-names expressions (#6741)", {
df <- tibble(a = 1L)
expect_identical(summarise(df, sum(-a)), tibble("sum(-a)" = -1L))
df <- tibble(a = 1:3)
expect_identical(summarise(df, min(-a)), tibble("min(-a)" = -3L))
})

# grouping ----------------------------------------------------------------
Expand Down

0 comments on commit e10b1dd

Please sign in to comment.