Skip to content

Commit f067dbc

Browse files
committed
Added LUSolve unit test
1 parent 12f033e commit f067dbc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Tests/TestRunner.bas

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,22 @@ TestFail:
675675
Resume TestExit
676676
End Sub
677677

678+
'@TestMethod("Linear Algebra Functions")
679+
Private Sub LUsolve()
680+
On Error GoTo TestFail
681+
682+
actual = GetResult( _
683+
"LUSOLVE(ARRAY(a;b;c);{{'x';'y';'z'}};{{2;3;4}};True)" _
684+
, "a={1;0;4};b={1;1;6};c={-3;0;-10}")
685+
expected = "x = -18; y = -9; z = 5"
686+
Assert.AreEqual expected, actual
687+
TestExit:
688+
Exit Sub
689+
TestFail:
690+
Assert.Fail "Test raised an error: #" & err.number & " - " & err.Description
691+
Resume TestExit
692+
End Sub
693+
678694
'@TestMethod("Linear Algebra/Stats Functions")
679695
Private Sub StraightLineFit()
680696
On Error GoTo TestFail

0 commit comments

Comments
 (0)