I am trying to debug the following unit test for a 2D TArray-based class (MatrixRmn).
Something is wrong with my maths in this particular method, however debugging using break points in Visual Studio is a lesson in frustration, due to how Watching values cannot use an operator, leading to a series of lines looking like: PreReduced.operator.operator
I have tried logging values, however I cannot see anything in my logs when running the test in the editor! (Session Frontend → Automation → Start Tests).
bool MatrixRmnSolve::RunTest(const FString& Parameters)
{
MatrixRmn PreReduced = MatrixRmn(4, 3);
MatrixRmn ExpectedReduced = MatrixRmn(4, 3);
PreReduced[0][0] = 1;
PreReduced[0][1] = 2;
PreReduced[0][2] = -2;
PreReduced[1][0] = 2;
PreReduced[1][1] = 3;
PreReduced[1][2] = 0;
PreReduced[2][0] = -1;
PreReduced[2][1] = -1;
PreReduced[2][2] = -3;
PreReduced[3][0] = -4;
PreReduced[3][1] = -11;
PreReduced[3][2] = 22;
ExpectedReduced[0][0] = 1;
ExpectedReduced[0][1] = 0;
ExpectedReduced[0][2] = 0;
ExpectedReduced[1][0] = 0;
ExpectedReduced[1][1] = 1;
ExpectedReduced[1][2] = 0;
ExpectedReduced[2][0] = 0;
ExpectedReduced[2][1] = 0;
ExpectedReduced[2][2] = 1;
ExpectedReduced[3][0] = -8;
ExpectedReduced[3][1] = 1;
ExpectedReduced[3][2] = -2;
MatrixRmn TestReduced = MatrixRmn(PreReduced);
TestReduced.ConvertToRowEchelonForm();
UE_LOG(LogTemp, Log, TEXT("TestReduced value is BLAH")); //, FString(TestReduced)
//UE_LOG(LogTemp, Log, TEXT("ExpectedReduced value is %s"), FString(ExpectedReduced));
TestEqual("ConvertToRowEchelonForm", TestReduced, ExpectedReduced);
return true;
}