From de1dbac07cd1ffa35576b8eb67ddf2e23536847c Mon Sep 17 00:00:00 2001 From: Ward Langeraert Date: Mon, 9 Sep 2024 18:56:33 +0200 Subject: [PATCH] normal can go outside range --- tests/testthat/test-grid_designation.R | 3 ++- tests/testthat/test-sample_from_binormal_circle.R | 2 -- tests/testthat/test-sample_from_uniform_circle.R | 3 +++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/testthat/test-grid_designation.R b/tests/testthat/test-grid_designation.R index cdf2150..8147f2e 100644 --- a/tests/testthat/test-grid_designation.R +++ b/tests/testthat/test-grid_designation.R @@ -322,7 +322,8 @@ test_that("number of observations be the same as output if aggregate = FALSE", { }) expect_equal(grid_designation(observations_sf2, grid = grid_df1, randomisation = "normal", - aggregate = FALSE) %>% + aggregate = FALSE, + seed = 123) %>% nrow(), nrow(observations_sf2)) }) diff --git a/tests/testthat/test-sample_from_binormal_circle.R b/tests/testthat/test-sample_from_binormal_circle.R index a7e7f7b..0c623ae 100644 --- a/tests/testthat/test-sample_from_binormal_circle.R +++ b/tests/testthat/test-sample_from_binormal_circle.R @@ -211,8 +211,6 @@ test_that("distance to new point falls within coordinate uncertainty", { }) # in case of provided initial coordinateUncertaintyInMeters column - ## no seed - expect_true(test_smaller_distances(observations_sf2)) ## different seeds expect_true(test_smaller_distances(observations_sf2, seed = 123)) expect_true(test_smaller_distances(observations_sf2, seed = 456)) diff --git a/tests/testthat/test-sample_from_uniform_circle.R b/tests/testthat/test-sample_from_uniform_circle.R index 56ceca0..4b27719 100644 --- a/tests/testthat/test-sample_from_uniform_circle.R +++ b/tests/testthat/test-sample_from_uniform_circle.R @@ -187,6 +187,9 @@ test_that("distance to new point falls within coordinate uncertainty", { }) # in case of provided initial coordinateUncertaintyInMeters column + ## no seed + expect_true(test_smaller_distances(observations_sf2)) + ## different seeds expect_true(test_smaller_distances(observations_sf2, seed = 123)) expect_true(test_smaller_distances(observations_sf2, seed = 456)) })