Skip to content

Commit

Permalink
Add test cases #19
Browse files Browse the repository at this point in the history
  • Loading branch information
hauselin committed Aug 4, 2024
1 parent 277aaf9 commit 6b0bf26
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
library(testthat)
library(ollamar)

test_that("copy function works with basic input", {
skip_if_not(test_connection()$status_code == 200, "Ollama server not available")

x <- rnorm(5)
expect_true(vector_norm(x) == sqrt(sum(x^2)))
expect_true( all.equal(1, vector_norm(x)) != TRUE )
expect_true(all.equal(1, vector_norm(normalize(x))))

})

0 comments on commit 6b0bf26

Please sign in to comment.