Skip to content

Commit

Permalink
✅ Add test case for computing epanechnikov kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
NONONOexe committed Sep 10, 2024
1 parent 323ed5f commit 6d5ef83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-compute-epanechnikov.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
test_that("`compute_epanechnikov` works for a vector of valid input", {
x <- seq(-1.5, 1.5, 0.5)
results <- compute_epanechnikov(x)
expect_equal(results, c(0, 0, 9/16, 3/4, 9/16, 0, 0))
})

0 comments on commit 6d5ef83

Please sign in to comment.