Implement `constexpr` generators or add the possibility for combining signature-based parametrised tests
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず docs/generators.md と docs/test-cases-and-sections.md を読み、特に generator、型パラメータ化、およびシグネチャーベースのテストのセクションを確認してください。以前に提案された解決策について、関連する issue 1702 を確認してください。Catch2 が要求どおり compile-time の non-type template parameters の組み合わせをサポートし、サポートされるアプローチが文書化され、関連するテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
There are various reasons why a class or function may have multiple non-type template parameters, including (but not limited to) compile-time feature toggling, guaranteed compile-time branch elimination, and multidimensional spans and containers with compile-time extents.
There are already two features that are close to the request, but none seem to satisfy it exactly:
- Generators allow going through a Cartesian product of inputs.
- Type parametrised test cases have
TEMPLATE_PRODUCT_TEST_CASEfor combining types, and signature-based parametrised tests allow traversing compile-time constants. TEMPLATE_LIST_TEST_CASEallows using anstd::tupleto represent types. Using anstd::tupleofconstexprvalues forTEMPLATE_TEST_CASE_SIGwould allow for at least manual compile-time generation of all required combinations.
Evident limitations of these approaches in the context of the request:
- Generators do not support
constexprvalues, so they cannot be used for non-type template parameters. - A signature-based parameterised test argument list grows exponentially with any additional argument that needs to be combined with the others.
- The template list test case does not support values directly. However, there is std::integral_constant, which is sufficient for a lot of applications, but not all, because non-type template parameters are not limited to integral constants.
Additional context
Another user already made a similar request and was satisfied with the proposed solution, but I cannot reopen it and am unsure whether a comment in the closed issue would be lost.
- 主要言語
- C++
- スター
- 21.6k
- フォーク
- 3.4k
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
catchorg/Catch2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 2 日以内に返信
-
catch_discover_tests passes all EXTRA_ARGS as one argument対応中かも @CyberKun が 11 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
catchorg/Catch2#3239 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Not seeing some error messages from fakeit in jetbrains rider対応中かも @Amanpal9 が 21 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
catchorg/Catch2#3228 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0対応中かも @nafiurahman00 が 8 日前に担当しました。 オープンExtras
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
catchorg/Catch2#3241 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
catchorg/Catch2 の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
cp-algorithms/cp-algorithms#1774 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
telefonicaid/fiware-orion#4836 ·
メンテナーはふだん 1 日以内に返信
-
nixd exits at startup when its parent process belongs to another user対応中かも @conao3 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nix-community/nixd#930 ·
メンテナーはふだん 2 日以内に返信
-
refactor topic-ui topic-weather
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Command-Install Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
microsoft/winget-cli#6718 ·
メンテナーはふだん 2 日以内に返信