Use quasiquotation #626
Closed
Use quasiquotation #626
Comments
This was referenced Oct 1, 2017
Basic idea: bad_sum <- function(...) 0
val1 <- 1
val2 <- 1
exp <- 3
expect_equal(bad_sum(!!val1, !!val2), !!exp)
# Should generate same failure message as
expect_equal(bad_sum(1, 1), 3)
#> Error: bad_sum(1, 1) not equal to 3.
#> 1/1 mismatches
#> [1] 10 - 3 == 7 This is not tidy eval, but quasiquotation + quosures in order to generate better labels. |
|
This was referenced Oct 6, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To better support parameterised tests. Should include #524
test_that()
needs to useenquo()
andtest_code()
needs to useeval_tidy()
. Might be root cause of #616. This will also need changes totest_rd()
andtest_example()
.label()
needs to useenexpr()
andexpr_label()
(may need to port multi-line function fix from f7dd41b)expect_*
needs toenquo()
and then immediately evaluate.The text was updated successfully, but these errors were encountered: