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

move rest of tests to testament #16140

Merged
merged 3 commits into from
Nov 27, 2020
Merged

move rest of tests to testament #16140

merged 3 commits into from
Nov 27, 2020

Conversation

ringabout
Copy link
Member

No description provided.

@ringabout
Copy link
Member Author

ringabout commented Nov 26, 2020

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

@timotheecour
Copy link
Member

32 bit float => loss of precision

@ringabout
Copy link
Member Author

@timotheecour
Thanks for hints. You are really helpful!!!

epsilon /= 2.0
let data = @[1.0, epsilon, -epsilon]
assert sumKbn(data) == 1.0
assert sumPairs(data) != 1.0 # known to fail
Copy link
Member Author

@ringabout ringabout Nov 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert sumPairs(data) != 1.0 # known to fail
# assert sumPairs(data) != 1.0 # known to fail in 64 bits

Copy link
Member Author

@ringabout ringabout Nov 27, 2020

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

Copy link
Member

@timotheecour timotheecour Nov 27, 2020

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)

@ringabout ringabout closed this Nov 27, 2020
@ringabout ringabout reopened this Nov 27, 2020
@Araq Araq merged commit bc1db0d into nim-lang:devel Nov 27, 2020
mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
* move rest of tests to testament
* Update tests/stdlib/tsums.nim
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
* move rest of tests to testament
* Update tests/stdlib/tsums.nim
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

Successfully merging this pull request may close these issues.

3 participants