From a358567c8fd3274860c764fc67ee3240334248db Mon Sep 17 00:00:00 2001 From: Cody Michael Jones <46515483+cm-jones@users.noreply.github.com> Date: Sat, 29 Jun 2024 13:06:01 -0500 Subject: [PATCH] Fix unit tests to use multiply_vector() --- tests/test_matrix.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_matrix.cpp b/tests/test_matrix.cpp index 4d72b91..fb2e756 100644 --- a/tests/test_matrix.cpp +++ b/tests/test_matrix.cpp @@ -496,15 +496,14 @@ TEST_F(MatrixTest, Solve) { Matrix mat(3, 3, {3, 2, -1, 2, -2, 4, -1, 0.5, -1}); Vector vec({1, -2, 0}); Vector solution = mat.solve(vec); - + // Check Ax = b - Vector result = mat * solution; + Vector result = mat.multiply_vector(solution); EXPECT_NEAR(result[0], vec[0], 1e-9); EXPECT_NEAR(result[1], vec[1], 1e-9); EXPECT_NEAR(result[2], vec[2], 1e-9); } -// Main function to run the tests int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS();