Skip to content

NSGeometry: add unit tests #47

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
Dec 8, 2015
Merged

NSGeometry: add unit tests #47

merged 1 commit into from
Dec 8, 2015

Conversation

jessesquires
Copy link
Contributor

This PR implements the following:

  • NSMake* functions from NSGeometry
    • NSMakePoint
    • NSMakeSize
    • NSMakeRect
  • Simplify the default initializers to delegate to the memberwise initializers
  • Unit tests for all additions/changes

I decided to make CGFloat implement Comparable mostly to simplify testing. (Since CGFloat(1.0).native became very verbose and repetitive.) However, I noticed that a PR for conforming NSDate to Comparable was declined because it was considered an API change. It's not clear if this is also considered an API change that necessitates following the Swift evolution process since CGFloat is more or less a a basic type? In any case, I'm happy to make any necessary changes.

@jessesquires
Copy link
Contributor Author

Oh I just noticed #35. Ha, I should have looked more closely. Sorry for the dupe. 😄

This could still be considered for the unit tests alone. (Or considered altogether since it is a smaller change.)

@parkera
Copy link
Contributor

parkera commented Dec 6, 2015

I'm going to ask for #35 to be rebased, then we can incorporate your unit tests as a PR on top of that.

@jessesquires jessesquires changed the title Implement NSGeometry NSMake* funcs, simplify init methods, add unit tests NSGeometry: add unit tests Dec 8, 2015
@jessesquires
Copy link
Contributor Author

Thanks @parkera !

Updated:

  • rebased
  • some formatting

My original tests don't cover everything added from #35, but I'll submit another PR for those to keep this one small. 😄

@parkera parkera merged commit c184cf8 into swiftlang:master Dec 8, 2015
@jessesquires jessesquires deleted the nsgeometry branch December 9, 2015 07:04
atrick pushed a commit to atrick/swift-corelibs-foundation that referenced this pull request Jan 12, 2021
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Oct 11, 2023
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