-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
move rest of tests to testament #16140
Conversation
Why this fails? I can't understand. It shouldn't be OS specfic 2020-11-26T03:58:00.5999865Z tsums.nim(9) tsums
2020-11-26T03:58:00.6000107Z assertions.nim(30) failedAssertImpl
2020-11-26T03:58:00.6000373Z assertions.nim(23) raiseAssert
2020-11-26T03:58:00.6000611Z fatal.nim(49) sysFatal
2020-11-26T03:58:00.6001113Z Error: unhandled exception: tsums.nim(9, 8) `sumPairs(data) != 1.0` [AssertionDefect]
2020-11-26T03:58:00.6001526Z
2020-11-26T03:58:00.6001709Z FAIL: megatest execution failed |
32 bit float => loss of precision |
@timotheecour |
tests/stdlib/tsums.nim
Outdated
epsilon /= 2.0 | ||
let data = @[1.0, epsilon, -epsilon] | ||
assert sumKbn(data) == 1.0 | ||
assert sumPairs(data) != 1.0 # known to fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert sumPairs(data) != 1.0 # known to fail | |
# assert sumPairs(data) != 1.0 # known to fail in 64 bits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is disabled now.
Or?
When sizeof(int) == 8:
assert sumPairs(data) != 1.0 # known to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use when (likewise, when defined posix is used a lot in runnableExamples)
* move rest of tests to testament * Update tests/stdlib/tsums.nim
* move rest of tests to testament * Update tests/stdlib/tsums.nim
No description provided.