Skip to content

Add implementation for NSURL copy() #382

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 1 commit into from
Jul 8, 2016

Conversation

mbvreddy
Copy link
Contributor

This PR has below implementations along with testcase

NSURL.copyWithZone()
NSURLQueryItem.copyWithZone()

func test_copy() {
let url = NSURL(string: "https://www.swift.org")
let urlCopy = url!.copy() as! NSURL
XCTAssertTrue(url === urlCopy)
Copy link
Contributor

Choose a reason for hiding this comment

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

This requires that the url instance is the same as the other; we may change that in the future. I would prefer the test checks a property of the URL for equality, or even better calls into URL's isEqual

@mbvreddy
Copy link
Contributor Author

mbvreddy commented Jun 1, 2016

@parkera I've squashed suggested changes. Please check.

check for isEqual in testcase instead of identical operator
@mbvreddy
Copy link
Contributor Author

@parkera

I've resolved conflicts.

NSURL.copy is already taken care by @phausler with commit 6ce8432

This PR now has implementation for NSURLQueryItem.copy() along with testcase.

@mbvreddy
Copy link
Contributor Author

mbvreddy commented Jul 8, 2016

@parkera can this be merged?

@parkera
Copy link
Contributor

parkera commented Jul 8, 2016

Yes, this should be good.

@parkera
Copy link
Contributor

parkera commented Jul 8, 2016

@swift-ci please test

@parkera parkera merged commit 48556cc into swiftlang:master Jul 8, 2016
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.

2 participants