Skip to content

Commit ab9e994

Browse files
committed
Fixing a test issue that offsets loc2idx by one (0-based)
1 parent 0ec1f38 commit ab9e994

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/testthat/test-cpp.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ test_that("C++: Utils", {
5050
})
5151
re1 <- x[locs[[1]], locs[[2]], locs[[3]]]
5252
locs <- lapply(locs, as_int64)
53-
expect_equal(loc2idx(locs, dim), as_int64(re1))
53+
54+
v1 <- loc2idx(locs, dim)
55+
v2 <- as_int64(re1 - 1L)
56+
expect_identical(v1, v2)
5457

5558
})
5659

0 commit comments

Comments
 (0)