@@ -69,6 +69,18 @@ test_two_sample_test_verbose <- function() {
6969 ps2 <- trefoils2 [1 : 5 ]
7070
7171 expect_silent(two_sample_test(ps1 , ps2 , B = 10L , verbose = FALSE ))
72+ expect_message(
73+ two_sample_test(ps1 , ps2 , B = 10L , verbose = TRUE ),
74+ " Parsing inputs..."
75+ )
76+ expect_message(
77+ two_sample_test(ps1 , ps2 , B = 10L , verbose = TRUE ),
78+ " Setting up the plausibility function..."
79+ )
80+ expect_message(
81+ two_sample_test(ps1 , ps2 , B = 10L , verbose = TRUE ),
82+ " Calculating the p-value..."
83+ )
7284}
7385
7486# Test different npc methods
@@ -83,6 +95,15 @@ test_two_sample_test_npc <- function() {
8395 expect_true(is.numeric(result_fisher ))
8496}
8597
98+ test_two_sample_test_bottleneck <- function () {
99+ ps1 <- trefoils1 [1 : 5 ]
100+ ps2 <- trefoils2 [1 : 5 ]
101+
102+ result <- two_sample_test(ps1 , ps2 , p = Inf , B = 10L )
103+ expect_true(is.numeric(result ))
104+ expect_true(result > = 0 && result < = 1 )
105+ }
106+
86107# Run all tests
87108test_two_sample_test <- function () {
88109 test_two_sample_test_inputs()
@@ -91,6 +112,7 @@ test_two_sample_test <- function() {
91112 test_two_sample_test_dist()
92113 test_two_sample_test_verbose()
93114 test_two_sample_test_npc()
115+ test_two_sample_test_bottleneck()
94116}
95117
96118test_two_sample_test()
0 commit comments