diff --git a/tests/testthat/test-ggtrace-fns.R b/tests/testthat/test-ggtrace-fns.R index 8d1bb5c..041ca2b 100644 --- a/tests/testthat/test-ggtrace-fns.R +++ b/tests/testthat/test-ggtrace-fns.R @@ -51,7 +51,8 @@ test_that("basic tracing tests for for custom functions", { expect_message(ggtrace(test_fn, 2:4, verbose = FALSE), "now being traced") invisible(test_fn()) expect_true(isFALSE(is_traced(test_fn))) - expect_equal(unlist(last_ggtrace()), 1:3) + expect_named(last_ggtrace()) + expect_equal(unname(last_ggtrace()), list(1,2,3)) expect_message(ggtrace(test_fn, 3, quote(a <- 10), verbose = FALSE), "now being traced") result_modified <- invisible(test_fn()) @@ -129,3 +130,4 @@ test_that("ggbody supports functions", { }) global_ggtrace_state(FALSE) + diff --git a/tests/testthat/test-ggtrace.R b/tests/testthat/test-ggtrace.R index acc1d24..fee2770 100644 --- a/tests/testthat/test-ggtrace.R +++ b/tests/testthat/test-ggtrace.R @@ -372,14 +372,12 @@ test_that("tracing every step of ggplot build works", { x = ggplot(), method = ggplot2:::ggplot_build.ggplot, trace_steps = seq_along(body(ggplot2:::ggplot_build.ggplot)), - use_names = FALSE, out = "tracedump" )), names(with_ggtrace( x = ggplot(), method = ggplot2:::ggplot_build.ggplot, trace_steps = "all", - use_names = FALSE, out = "tracedump" )) )