Skip to content

[test] SR-1238: Add test for UnsafePointer and UnsafeMutablePointer conformance to Comparable#2269

Merged
gribozavr merged 2 commits intoswiftlang:masterfrom
JaviSoto:SR-1238-UnsafePointer-Comparable-tests
Apr 22, 2016
Merged

[test] SR-1238: Add test for UnsafePointer and UnsafeMutablePointer conformance to Comparable#2269
gribozavr merged 2 commits intoswiftlang:masterfrom
JaviSoto:SR-1238-UnsafePointer-Comparable-tests

Conversation

@JaviSoto
Copy link
Contributor

What's in this pull request?

Added tests for Comparable conformance of UnsafePointer and UnsafeMutablePointer

Resolved bug number: (SR-1238)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@gribozavr
Copy link
Contributor

@swift-ci Please test

0x00000002,
0xFFFFFFFF,
0x00001111
].map { ($0, ${SelfType}(bitPattern: $0)!) }
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to throw in some 64-bit values if we are on a 64-bit platform (see #ifs in tests above).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 will do

@JaviSoto
Copy link
Contributor Author

AFAICT CI failed with an unrelated failure. I pushed a new commit with 64 bit values as requested however.

@gribozavr
Copy link
Contributor

@JaviSoto Thank you!

@swift-ci Please test and merge

@jrose-apple
Copy link
Contributor

Should AutoreleasingUnsafeMutablePointer be included? It's also Strideable.

Should OpaquePointer be included? It's not Strideable, but it probably still makes sense to be Comparable.

@gribozavr
Copy link
Contributor

@jrose-apple Thank you, we are forgetting about other pointer types again! I think it makes sense for them to be comparable.

@gribozavr gribozavr merged commit 4b06bb1 into swiftlang:master Apr 22, 2016
@JaviSoto
Copy link
Contributor Author

I'll open a separate PR for those!

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