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

[SR-865] NSUUID incorrectly returns lowercase from UUIDString #4164

Closed
phausler opened this issue Mar 3, 2016 · 5 comments
Closed

[SR-865] NSUUID incorrectly returns lowercase from UUIDString #4164

phausler opened this issue Mar 3, 2016 · 5 comments

Comments

@phausler
Copy link
Member

phausler commented Mar 3, 2016

Previous ID SR-865
Radar None
Original Reporter @phausler
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee eyeplum (JIRA)
Priority Medium

md5: c4345cde9354fcab76342a6a7d215484

Issue Description:

Testing on darwin:

let uuid = NSUUID(UUIDBytes: [0xe6,0x21,0xe1,0xf8,0xc3,0x6c,0x49,0x5a,0x93,0xfc,0x0c,0x24,0x7a,0x3e,0x6e,0x5f])
XCTAssertEqual(uuid.UUIDString, "E621E1F8-C36C-495A-93FC-0C247A3E6E5F")

Passes; unlike the swift-corelibs-foundation version.

@swift-ci
Copy link
Contributor

Comment by Yan Li (JIRA)

In TestUUID.swift:57, there is actually a XCTAssert message says:

The UUIDString representation must be lowercase as defined by RFC 4122.

I'm not sure if the lowercase UUIDString is a bug or it's intended to be lowercase.

@phausler
Copy link
Member Author

NSUUID in the objective-c Foundation is the standard we should be aiming for with swift-corelibs-foundation. So if there is a difference between behavior if at all possible, the goal should be to have a consistent experience between the two. So the desired behavior is capitalized output.

@swift-ci
Copy link
Contributor

Comment by Yan Li (JIRA)

Since the behavior is well defined, I think I will look into this.

@swift-ci
Copy link
Contributor

Comment by Yan Li (JIRA)

I've opened a pull request to fix this issue.

@swift-ci
Copy link
Contributor

Comment by Yan Li (JIRA)

Pull Request was merged.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants