Skip to content
New issue

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

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

Already on GitHub? # to your account

Missing comma in m_testCases array (tiny tests bug) #32

Open
amanofbits opened this issue Jun 30, 2024 · 0 comments
Open

Missing comma in m_testCases array (tiny tests bug) #32

amanofbits opened this issue Jun 30, 2024 · 0 comments

Comments

@amanofbits
Copy link

amanofbits commented Jun 30, 2024

// Small random numbers
-436730658, -2259913246, 329347474, 2565801981, 3398143698, 137497017, 1060347500,
-3457686027, 1923669753, 2891618613, 2418874813, 2899594950, 2265950765, -1962365447,
3077934393
// Tiny random numbers
- 171,
-359, 491, 844, 158, -413, -422, -737, -575, -330,

It looks like a comma is missing at the end of line 39. There is no compiler error produced because the next element is negative, hence these two elements are treated as single one (a-b).

The impact is zero for the test itself but it may cost an hour of debugging if someone like me tries to port the library to less comma-forgiving language like Go, and then suddenly realizes that the array copied yesterday somehow has different values and length than the original. :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant