Skip to content

Commit

Permalink
Test "verbose" option for R.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcurtin committed Apr 22, 2024
1 parent e4ab99d commit 734c834
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/mlpack/bindings/R/mlpack/tests/testthat/test-R_binding.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,16 @@ test_that("TestSerialization", {

expect_true(output2$model_bw_out == 20)
})

# Make sure that the verbose argument does anything at all.
test_that("TestVerbose", {
expect_output(output1 <- test_r_binding(4.0, 12, "hello",
build_model=TRUE,
verbose=TRUE))
})

# Test that we get no output when verbose output is disabled.
test_that("TestNotVerbose", {
expect_silent(output1 <- test_r_binding(4.0, 12, "hello",
build_model=TRUE))
})

0 comments on commit 734c834

Please sign in to comment.