Remove unit test context_t elements as overkill for a coverage test

Aperta
#264 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
c
Ambito
testing-qa

Direzione di ricerca

Non sono indicati file o test specifici. Individua gli stub dei test unitari che definiscono e salvano strutture *_context_t, quindi identifica i controlli che convalidano solo gli argomenti degli stub invece del comportamento funzionale. Il lavoro è completato quando i controlli di contesto non necessari vengono rimossi, mentre i test di coverage continuano a superare i test e mantengono la coverage prevista.

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

Descrizione

unit-test

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
There's a significant amount of unit test logic dedicated to confirming argument inputs to stub functions that go above and beyond the requirements of a coverage test. This logic is associated with defining and saving *_context_t structures from within stubs. While there is technically nothing wrong with these tests (they all pass), the issue is with technical debt. Unless the test is verifying requirements/spec/algorithm document there's also the question of what is truth.

Describe the solution you'd like
Use functional tests to verify function. Remove context checks that don't add value in the coverage test context.

Describe alternatives you've considered
Leave as is, but whenever maintenance is performed encourage simplification. At minimum we should avoid this pattern in new or updated tests.

Additional context
Along the same lines as removing the randomness, these aren't intended to be fuzz tests.

  • #86

Requester Info
Jacob Hageman - NASA/GSFC

Lingua principale
C
Stelle
122
Fork
79
Merge medio
1g 15h
PR unite (30g)
4

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 nasa/CF

Tutte le issue di nasa/CF

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.