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

doctor-data task 4 "get_older_bob" is confusing

Aperta
#878 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp
Ambito
testing-qa

Direzione di ricerca

Inizia con il task 4 di doctor-data, "get_older_bob", e il relativo test esistente, che verifica solo la stringa "Bob". Chiarisci se la funzione debba identificare il Bob Vessel più anziano, aggiungi casi di test per più Bob Vessels e per nessun Vessel corrispondente, oppure rinomina la funzione se questo comportamento non è previsto; i test devono distinguere il comportamento scelto.

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

Descrizione

I think in this case either the test case is to simple or the function name is misleading.
The test only checks if the function returns the string "Bob".
Out of two Vessels it seems to return the name of the one called "Bob".

The function name suggests that in the case of two Bob Vessels it would return the older one.
As it only returns the name there is no way to check though.

Also what happens when none of the inputs is a Vessel called "Bob"?

With all accessible information the most sensible solution to the task here might be to ignore the inputs and always return "Bob".

I think this function needs more test cases and/or should be ranamed.

Lingua principale
C++
Stelle
291
Fork
244
Merge medio
17m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 exercism/cpp

Tutte le issue di exercism/cpp

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.