x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Debug output during automation tests

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[](0).operator[](0)

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;
 }
Product Version: Not Selected
Tags:
more ▼

asked Apr 20 '15 at 01:48 AM in C++ Programming

avatar image

vikhik
227 12 17 28

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Figured out, looking at the wrong log...

I should have been looking at Session Frontend -> Console, not Window->Developer Tools->Output Log.

more ▼

answered Apr 20 '15 at 02:18 AM

avatar image

vikhik
227 12 17 28

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question