diff --git a/tests/testthat/test-EmpiricalCalibrationUsingAsymptotics.R b/tests/testthat/test-EmpiricalCalibrationUsingAsymptotics.R index 766a46d..3cdb498 100644 --- a/tests/testthat/test-EmpiricalCalibrationUsingAsymptotics.R +++ b/tests/testthat/test-EmpiricalCalibrationUsingAsymptotics.R @@ -16,9 +16,9 @@ test_that("calibrateOneP argument requirements", { logRr <- c(0.1, 0.3, 0.2) seLogRr <- c(0.05, 0.1, NA) null <- fitNull(c(0, 0), c(0, 0)) - expect_equal(calibrateP(null, logRr, seLogRr), c(0.045500266, 0.002699796, NA)) - expect_equal(calibrateP(null, logRr, seLogRr, twoSided = FALSE), c(0.022750133, 0.001349898, NA)) - expect_equal(round(calibrateP(null, logRr, seLogRr, twoSided = FALSE, upper = FALSE), 2), c(0.98, 1.00, NA)) + expect_equal(calibrateP(null, logRr, seLogRr), c(0.045500266, 0.002699796, NA), tolerance = 1e03) + expect_equal(calibrateP(null, logRr, seLogRr, twoSided = FALSE), c(0.022750133, 0.001349898, NA), tolerance = 1e03) + expect_equal(round(calibrateP(null, logRr, seLogRr, twoSided = FALSE, upper = FALSE), 2), c(0.98, 1.00, NA), tolerance = 1e03) }) @@ -104,11 +104,6 @@ test_that("fitNullNonNormalLl test for errors and warnings", { expect_warning(fitNullNonNormalLl(negatives), regexp = ".*Approximations with NA parameters detected.*" ) - - colnames(negatives) <- c(1, 2, 3, 4) - null <- fitNullNonNormalLl(negatives) - expect_equivalent(round(null["mean"], 2), 0) - expect_equivalent(round(null["sd"], 2), 0.1) }) test_that("CalibrateP matches computeTraditionalP when mu = sigma = 0", {