Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Have `WithSeeds` accept the `GoogleTest` `ParameterGenerator`s (such as `ValuesIn`, `Combine`, etc).

Aperta
#46 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
api, testing-qa

Direzione di ricerca

Inizia con l’API WithSeeds e la documentazione di GoogleTest sui generatori di parametri, in particolare ValuesIn e Combine. Determina come gli input dei generatori esistenti possano mantenere valori deterministici e supportare parametri singoli senza racchiuderli in tuple. Il lavoro è completato quando WithSeeds accetta i generatori GoogleTest pertinenti mantenendo il comportamento atteso dei seed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm currently in the process of pitching my team on using FUZZ_TEST instead of regular old GoogleTest TEST_P. Most of our tests currently use TEST_P, and my goal is to incrementally convert them from TEST_P to FUZZ_TEST keeping the behavior the same other than fuzzing. This means keeping the deterministically-executed values the same, which I plan to do with WithSeeds.

Unfortunately, WithSeeds is less flexible than the GoogleTest parameter generators in a number of important ways:

  1. In the case where a TestWithParam is parameterized on a single parameter, TestWithParam does not insist that that single parameter is wrapped in a std::tuple, but WithSeeds does.

  2. GoogleTest provides Combine, which allows taking lists of parameter generators and performing the cartesian product of them, producing all possible combinations of the parameter generator's outputs. To replicate this, it looks like I'll either have to manually generate each possible combination or whittle down the inputs and argue to my team that it's ok.

Ideally, I'd like to do neither of these things. I'd like to just continue passing the same parameter generators I sent into INSTANTIATE_TEST_SUITE_WITH_PARAMS into WithSeeds and have it figure it out. Doing so would make convincing others that I am not introducing regressions much simpler.

Lingua principale
C++
Stelle
1.1k
Fork
139
Merge medio
3g 1h
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di google/fuzztest

Tutte le issue di google/fuzztest

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.