doctor-data task 4 "get_older_bob" is confusing
- Ngôn ngữ chính
- C++
- Star
- 290
- Fork
- 244
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với task 4 của doctor-data, "get_older_bob", và test hiện có của task này, vốn chỉ kiểm tra chuỗi "Bob". Làm rõ liệu function có cần xác định Bob Vessel lớn tuổi hơn hay không, thêm các test case cho nhiều Bob Vessels và trường hợp không có Vessel nào khớp, hoặc đổi tên function nếu behavior đó không được dự định; các test phải phân biệt behavior đã chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- testing-qa
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100