diff --git a/.gitignore b/.gitignore index 1394380..3b25b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -inst/doc .Rproj.user .Rhistory .RData @@ -8,4 +7,4 @@ src/*.so src/*.dll src-i386 src-x64 -docs +docs/ diff --git a/tests/testthat/_snaps/ssm_plot/many-circle-repel.svg b/tests/testthat/_snaps/ssm_plot/many-circle-repel.svg new file mode 100644 index 0000000..03fecc4 --- /dev/null +++ b/tests/testthat/_snaps/ssm_plot/many-circle-repel.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +0.20 + +0.40 + +90° + +135° + +180° + +225° + +270° + +315° + +360° + +45° + + + + + + + + + + + + + +PARPD + +SCZPD + +SZTPD + +ASPD +many_circle repel + + diff --git a/tests/testthat/test-ssm_plot.R b/tests/testthat/test-ssm_plot.R index 7fb89e1..aeeaa5d 100644 --- a/tests/testthat/test-ssm_plot.R +++ b/tests/testthat/test-ssm_plot.R @@ -82,4 +82,6 @@ test_that("many plots works as expected", { vdiffr::expect_doppelganger("many_circle-plots", p) p2 <- ssm_plot_curve(res) vdiffr::expect_doppelganger("many_curve-plots", p2) + p3 <- ssm_plot_circle(res, repel = TRUE) + vdiffr::expect_doppelganger("many_circle repel", p3) }) diff --git a/tests/testthat/test-tidying_functions.R b/tests/testthat/test-tidying_functions.R index 3eeb8e1..0b58792 100644 --- a/tests/testthat/test-tidying_functions.R +++ b/tests/testthat/test-tidying_functions.R @@ -57,7 +57,7 @@ test_that("norm_standardize works", { expect_equal(round(new$X7_z, 4), c(2.0691, -1.7467, -0.8656, 1.5301, 0.0187)) expect_equal(round(new$X8_z, 4), c(0.5269, 3.0627, 3.2395, 1.8059, -0.6111)) expect_error(norm_standardize( - old, scales = 1:7, instrument = instrument("iipsc", sample = 1) + old, scales = 1:7, instrument = instrument("iipsc"), sample = 1 )) expect_equal(ncol(new), ncol(new2) + ncol(old)) }) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index 039f4b7..b245ea9 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -36,4 +36,5 @@ test_that("rescale works", { test_that("prettifying works", { expect_equal(pretty_min(0.5), 0.2) expect_equal(pretty_min(-0.5), -1.0) + expect_equal(pretty_min(-10), -15) })