exercism / exercism/cpp

doctor-data task 4 "get_older_bob" is confusing

未關閉
#878 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
290
分支
244
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。