-
Notifications
You must be signed in to change notification settings - Fork 339
Open
Description
Lines 53 to 54 in 2a0c29b
| if (length(act_miss)) sprintf("Needs: %s", values(act_miss)), | |
| if (length(exp_miss)) sprintf("Absent: %s", values(exp_miss)) |
The language for errors in expect_setequal() seems a little off. To me, both "Absent" and "Needs" convey the same thing.
Would it make more sense for "Needs" to be something like "Extra", to convey that there's an unexpected value?
library(testthat)
expect_setequal(object = 1:3, expected = 1:2)
#> Error: Expected `1:3` to have the same values as `1:2`.
#> Actual: 1, 2, 3
#> Expected: 1, 2
#> Needs: 3
expect_setequal(object = 1:2, expected = 1:3)
#> Error: Expected `1:2` to have the same values as `1:3`.
#> Actual: 1, 2
#> Expected: 1, 2, 3
#> Absent: 3Created on 2026-01-09 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
No labels