Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
wincowgerDEV committed Jan 5, 2024
1 parent 1a92705 commit 3e60593
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-smooth_intens.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ test_that("calc_window_points() will return consistent values", {
calc_window_points(raman_hdpe, 10000) |> expect_error()
})

test_that("calc_window_points() works with vectors", {
calc_window_points(raman_hdpe$wavenumber, 70) |> expect_equal(27)
calc_window_points(raman_hdpe$wavenumber, 50) |> expect_equal(19)
calc_window_points(raman_hdpe$wavenumber, 140) |> expect_equal(55)
calc_window_points(raman_hdpe$wavenumber, 10000) |> expect_error()
})

test_that("smooth_intens() works as expected", {
smt <- smooth_intens(raman_hdpe, polynomial = 3) |> expect_silent()

Expand Down

0 comments on commit 3e60593

Please sign in to comment.