Skip to content

Commit

Permalink
Avoid relying on type stability in sum() (#6902)
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr authored Aug 23, 2023
1 parent 001de12 commit cc86e9c
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 cc86e9c

Please sign in to comment.