Skip to content

Commit 3f5bed9

Browse files
committed
modify test
1 parent cf6140f commit 3f5bed9

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

inst/tests/tests.Rraw

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21077,14 +21077,4 @@ setindex(DT, b)
2107721077
test(2307, { capture.output(print(DT, class = TRUE, show.indices = TRUE)); TRUE })
2107821078

2107921079
# test for enhancing error message of invalid column #6512
21080-
uniq_diff <- function(...) {
21081-
.Call("uniq_diff", ...)
21082-
}
21083-
capture_error_message <- function(expr) {
21084-
msg <- tryCatch(
21085-
{ expr; NULL },
21086-
error = function(e) e$message
21087-
)
21088-
msg
21089-
}
21090-
test(2308, {msg <- capture_error_message(uniq_diff(as.integer(c(1, 2, -1, 4)), 4, FALSE))print(msg)return(grepl("\\[-1\\]", msg))}, TRUE)
21080+
test(2308, {msg <- tryCatch({ .Call("uniq_diff", as.integer(c(1, 2, -1, 4)), 4, FALSE); NULL }, error = function(e) e$message)print(msg)return(grepl("\\[-1\\]", msg))}, TRUE)

0 commit comments

Comments
 (0)