From 8913e59896712540dc59463b15ccf9b51433a5ac Mon Sep 17 00:00:00 2001 From: Andy Zhang <37402126+AnzhiZhang@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:03:09 +0100 Subject: [PATCH] test(matrices): add golub tests --- test/matrices/golub.jl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/matrices/golub.jl diff --git a/test/matrices/golub.jl b/test/matrices/golub.jl new file mode 100644 index 0000000..2522fac --- /dev/null +++ b/test/matrices/golub.jl @@ -0,0 +1,14 @@ +# constructors +@test allequal([ + Golub(5), + Golub{Float64}(5), +]) + +# linear algebra functions +test_linearalgrbra_functions(Golub.(1:5)) + +# eltype +@test test_matrix_elements(Golub{Int32}(5)) + +# content +@test Golub(5) ≈ [1.0 -12.059392205936174 -0.010465350557232633 7.317239602093354 -14.08806425045688; -2.2496850802760484 28.129834722891875 -4.172651248786176 -26.542279985765383 25.12451193149186; 11.072255235326002 -138.58620819434586 22.12333253812682 141.1394714314565 -120.7085677675904; 2.0022829883980857 -3.3531693476211615 -86.38096436992623 -185.84514253414142 -146.35427551650628; -7.9683155345021275 88.11144478734175 37.742511109441665 64.48389833213189 247.7662740813908]