Skip to content

Some i128 tests #38767

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

Merged
merged 2 commits into from
Jan 5, 2017
Merged

Some i128 tests #38767

merged 2 commits into from
Jan 5, 2017

Conversation

est31
Copy link
Member

@est31 est31 commented Jan 1, 2017

  • Add some FFI tests for i128 on architectures where we have sort of working "C" FFI support. On all other architectures we ignore the test.
  • enhance the u128 overflow tests

@rust-highfive
Copy link
Contributor

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@est31
Copy link
Member Author

est31 commented Jan 1, 2017

The makefile looks a bit contrived, but its the only way (the compiletest tool doesn't set stage0 or "windows" cfg's).

@@ -0,0 +1,30 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
Copy link
Member

Choose a reason for hiding this comment

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

Just use the rust_test_helpers.c file that we have precisely for the C FFI testing.

Copy link
Member

Choose a reason for hiding this comment

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

This test then can become a plain run-pass one.

@est31
Copy link
Member Author

est31 commented Jan 1, 2017

Okay, no more makefiles, thanks to @nagisa

@eddyb
Copy link
Member

eddyb commented Jan 4, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 4, 2017

📌 Commit 620027c has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Jan 4, 2017

⌛ Testing commit 620027c with merge 3fb46f9...

@bors
Copy link
Collaborator

bors commented Jan 4, 2017

💔 Test failed - status-travis

@nagisa
Copy link
Member

nagisa commented Jan 4, 2017

The error seems to be relevant. (1i128 << 127) == i128::min_value() and negating min_value of anything will always overflow.

@est31
Copy link
Member Author

est31 commented Jan 4, 2017

Okay, I think I've fixed it now. Also, the 128 ffi test got a comment about why its ignored on windows.

r? @eddyb

@rust-highfive rust-highfive assigned eddyb and unassigned aturon Jan 4, 2017
@eddyb
Copy link
Member

eddyb commented Jan 4, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 4, 2017

📌 Commit 28f6d4a has been approved by eddyb

@bors
Copy link
Collaborator

bors commented Jan 5, 2017

⌛ Testing commit 28f6d4a with merge 26e2ee0...

bors added a commit that referenced this pull request Jan 5, 2017
Some i128 tests

* Add some FFI tests for i128 on architectures where we have sort of working "C" FFI support. On all other architectures we ignore the test.
* enhance the u128 overflow tests
@bors
Copy link
Collaborator

bors commented Jan 5, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 26e2ee0 to master...

@bors bors merged commit 28f6d4a into rust-lang:master Jan 5, 2017
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.

6 participants