tests/testthat/test-solve.R

################################################################################

context("SOLVE_LINEAR_SYSTEM")

################################################################################

test_that("solve_linear_system() works", {
  A <- matrix(rnorm(4), 2); A[1, 2] <- A[2, 1]  # should be symmetric
  x <- rnorm(2)
  b <- A %*% x
  x2 <- solve_linear_system(A, b)
  expect_equal(x2, x)
})

################################################################################

Try the bigutilsr package in your browser

Any scripts or data that you put into this service are public.

bigutilsr documentation built on Aug. 8, 2025, 7:24 p.m.