Not seeing some error messages from fakeit in jetbrains rider
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with XmlReporter::assertionEnded and inspect how its switch handles each ResultWas type. Check the XML reporter tests for ExpressionFailed output, then verify that the failure message and actual call sequence appear in JetBrains Rider. The issue provides the missing case and the expected result.
Written by the indexing model from the issue text.
Description
When fakeit is used to test for a specific sequence of calls that is not satisfied, the error message shown in Jetbrains Rider only shows the expected sequence, not the actual sequence.
I tracked it down to a switch statement in XmlReporter::assertionEnded. It appears to be missing a case for ResultWas::ExpressionFailed.
I added the missing case (showing some of the surrounding code):
m_xml.scopedElement( "Expanded" )
.writeText( result.getExpandedExpression() );
}
// And... Print a result applicable to each result type.
switch( result.getResultType() ) {
case ResultWas::ExpressionFailed:
m_xml.startElement( "ExpressionFailed" );
writeSourceInfo( result.getSourceInfo() );
m_xml.writeText( result.getMessage() );
m_xml.endElement();
break;
case ResultWas::ThrewException:
m_xml.startElement( "Exception" );
writeSourceInfo( result.getSourceInfo() );
and now I correctly see the failure message reported by fakeit in result.getMessage().
- Dominant language
- C++
- Stars
- 21.6k
- Forks
- 3.4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from catchorg/Catch2
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 2 days
-
catch_discover_tests passes all EXTRA_ARGS as one argumentPossibly taken @CyberKun claimed this 11 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
catchorg/Catch2#3239 · 1 comment ·
Maintainers usually reply within 2 days
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0Possibly taken @nafiurahman00 claimed this 8 days ago. OpenExtras
Difficulty 3/5 1-2 days Newbie friendliness 72/100
catchorg/Catch2#3241 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 2 days
-
Commit `b710039` breaks tests with overloaded `operator==`Possibly taken @michaelbawuah claimed this 45 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 75/100
catchorg/Catch2#3221 · 1 reaction ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cp-algorithms/cp-algorithms#1774 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
telefonicaid/fiware-orion#4836 ·
Maintainers usually reply within 1 day
-
nixd exits at startup when its parent process belongs to another userPossibly taken @conao3 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nix-community/nixd#930 ·
Maintainers usually reply within 2 days
-
refactor topic-ui topic-weather
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Command-Install Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
microsoft/winget-cli#6718 ·
Maintainers usually reply within 2 days