-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test output parser confuses exception message with error location #157
Comments
Now that's what I call a bug report! 👍 However, the adapter's behavior is not as strange as it looks - here's the output your sample code produces:
The Your TestWithoutStackTrace does not have this problem due to the inserted Of course, we can not rely on the exception message containing the exception's location. We will still try to fix the first problem! |
Hi Chris, Basically, you are telling us that GoogleTestAdapter produces a StackTrace in the first case just "by luck". Only because our Exception text contains the Thanks for your support |
You're welcome. Sometimes, all you need is luck :-) |
and... I am still going to have "luck" after your fix? :-) --> in case that google is not able to provide the information concerning the file producing the exception but message contains valid information, are you going to keep the old behavior? |
No, I don't think so... That's what I meant with "we can not rely on the exception message containing the exception's location". I think you are being stuck with the location of the test case itself. However, have a look at our (i.e., gtest's) option Catch exceptions, which might be what you need! Btw, this option is also available via toolbar. |
Hi,
I have a strange behavior with GoogleTestAdapter in tests that throw exceptions
The output of the window looks like the following file: test_output.txt
The test result window shows the following for "Test.WithStackTrace" (filename string is cut)
However, for "Test.WithoutStackTrace" shows the following (correct exception text, but no StackTrace)
As you can see, the GoogleTestAdapter, does not parse correctly the test output. Notice the dash ("-") after the ":" at the end of the filename in the exception text of "Test.WithoutStackTrace"
I would expect to see the correct text (result message) and the Stack Trace in both tests
You can reproduce the failures with the following code
example_code.cpp.txt
The text was updated successfully, but these errors were encountered: