Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kaelonR opened this issue Oct 29, 2021 · 0 comments

Comments

@kaelonR
Copy link
Contributor

kaelonR commented Oct 29, 2021

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

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

image
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

@kaelonR kaelonR changed the title Hyper-optimized Telemetry: Two unit tests are not following specifications in instructions Hyper-optimized Telemetry: Two unit tests are not following specifications in instructions for encoding Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant