Implement `constexpr` generators or add the possibility for combining signature-based parametrised tests
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 28/100
Línea de trabajo
Empieza leyendo docs/generators.md y docs/test-cases-and-sections.md, especialmente las secciones sobre tests basados en generator, parametrizados por tipo y basados en firma. Revisa el issue relacionado 1702 para consultar la solución propuesta anteriormente. Se considera terminado cuando Catch2 admita combinar parámetros de plantilla no tipo en tiempo de compilación como se solicita, y el enfoque compatible esté documentado y cubierto por tests relevantes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 21.6k
- Forks
- 3.4k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de catchorg/Catch2
-
catch_discover_tests fails for Windows test executables run under Wine since v3.15.2Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
catch_discover_tests passes all EXTRA_ARGS as one argumentPosiblemente ocupada @CyberKun la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
catchorg/Catch2#3239 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Not seeing some error messages from fakeit in jetbrains riderPosiblemente ocupada @Amanpal9 la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
catchorg/Catch2#3228 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0Posiblemente ocupada @nafiurahman00 la tomó hace 8 días. AbiertoExtras
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
catchorg/Catch2#3241 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de catchorg/Catch2
Issues similares
-
Build fails on macOS 27: dyld refuses stripped Rust proc-macros (mis-aligned LINKEDIT string pool)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
cloudflare/workerd#8963 ·
Los mantenedores suelen responder en 1 día
-
Android Bug Core Drape
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
organicmaps/organicmaps#14449 ·
Los mantenedores suelen responder en 1 día
-
comp-codecs
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ClickHouse/ClickHouse#135159 ·
Los mantenedores suelen responder en 1 día
-
difficulty:easy func:python os:windows prio:high type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NatronGitHub/Natron#2029 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ardazishvili/Sota#114 ·
Los mantenedores suelen responder en 1 día