exercism / exercism/csharp

Hyper-optimized Telemetry: Two unit tests are not following specifications in instructions for encoding

Đang mở
#1,795 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
427
Fork
383
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
5

Mô tả

On the Hyper-optimized Telemetry exercise, the instructions specify a table of ranges and target types for determining which type should be used when converting a long to the smallest integral type. Of particular interest in this issue is the range 0 - 65535 which should be represented with a `ushort`:

![image](https://user-images.githubusercontent.com/28660369/139478375-967596dd-a479-4031-b0a0-9b90f0d06eac.png)

However, two unit tests are not following this specification. First one is `ToBuffer_upper_short`:

![image](https://user-images.githubusercontent.com/28660369/139478743-db560855-f2bb-4d9b-b74d-15d41bcd9cb7.png)
Since the supplied value 32767 is between 0 and 65353, this should be an unsigned short. Specifically `0x2, 0xff, 0x7f`.

The second unit tests not following the instructions is `ToBuffer_Zero`. It has the exact same problem, expecting 0 to be a signed short, while the instructions specify that it should be unsigned.
![image](https://user-images.githubusercontent.com/28660369/139479316-b28b4e5a-f3f6-4e2f-8bc4-abd8072bbb4e.png)

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

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.