From ec15b87bfc1c7acb117aefe03307f589cea689bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Nov 2026 07:56:50 +0000 Subject: [PATCH 1/2] Initial plan From b5171cf628437649641540daf78dead8f60b7b31 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Nov 2026 07:59:47 +0000 Subject: [PATCH 2/2] Correct Lowlander ranking regression expectation Co-authored-by: asgr <5617132+asgr@users.noreply.github.com> --- tests/testthat.R | 4 ++++ tests/testthat/test-lowlander-helpers.R | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/testthat.R create mode 100644 tests/testthat/test-lowlander-helpers.R diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..2292108 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,4 @@ +library(testthat) +library(Highlander) + +test_check("Highlander") diff --git a/tests/testthat/test-lowlander-helpers.R b/tests/testthat/test-lowlander-helpers.R new file mode 100644 index 0000000..50f4be7 --- /dev/null +++ b/tests/testthat/test-lowlander-helpers.R @@ -0,0 +1,14 @@ +test_that("Lowlander_kept ranks finite samples in the recorded direction", { + result <- list( + latin_mod = matrix(c(0, 10, 1, 11, 2, 12, 3, 13), ncol = 2, byrow = TRUE), + keep = 1:4, + output = c(4, 1, 3, 2), + liketype = "min" + ) + result$output[2] <- Inf + + expect_equal( + Lowlander_kept(result), + matrix(c(3, 13, 2, 12, 0, 10), ncol = 2, byrow = TRUE) + ) +})