Not seeing some error messages from fakeit in jetbrains rider

オープン 初心者向け
#3,228 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@Amanpal9 がすでに取り組んでいます。

2026年11月6日 から。

  • #3232 @Amanpal9 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cpp
領域
testing

調査の方向性

XmlReporter::assertionEndedから始め、switchが各ResultWas型をどのように処理するかを確認してください。XML reporterのテストでExpressionFailedの出力を確認し、失敗メッセージと実際の呼び出しシーケンスがJetBrains Riderに表示されることを検証してください。Issueには不足しているケースと期待される結果が示されています。

索引モデルが issue の本文から書いたものです。

説明

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().

主要言語
C++
スター
21.6k
フォーク
3.4k
平均マージ
3日 12時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

catchorg/Catch2 のほかの issue

catchorg/Catch2 の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。