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

[README] XCTest has type safety like Nimble #73

Merged
merged 1 commit into from
Dec 17, 2014
Merged

[README] XCTest has type safety like Nimble #73

merged 1 commit into from
Dec 17, 2014

Conversation

kylef
Copy link
Contributor

@kylef kylef commented Dec 17, 2014

It has the exact same behaviour as Quick.

func XCTAssertEqual<T : Equatable>(expression1: @autoclosure () -> [T], expression2: @autoclosure () -> [T], _ message: String = default, file: String = default, line: UInt = default)

Nimble uses generics--only available in Swift--to ensure type correctness. That means type checking is not available when using Nimble in Objective-C

@kylef kylef changed the title [README] XCTest has type safety like Quick [README] XCTest has type safety like Nimble Dec 17, 2014
    func XCTAssertEqual<T : Equatable>(expression1: @autoclosure () -> [T], expression2: @autoclosure () -> [T], _ message: String = default, file: String = default, line: UInt = default)
@modocache
Copy link
Member

Nice catch, @kylef! 💯

This means Quick/Quick#121 is an especially egregious bug, since it prevents use of XCTAssert from within Quick examples written in Objective-C, even where they may be more type-safe.

/cc @jeffh for any thoughts and, if none, a merge.

@modocache
Copy link
Member

Oh wait, never mind--of course XCTAssert in Objective-C doesn't have type safety. 😛

Still, this seems like an accurate change to the documentation--Nimble shouldn't advertise advantages that already exist in (the Swift versions of) XCTAssert.

@kylef
Copy link
Contributor Author

kylef commented Dec 17, 2014

Exactly. Nimble doesn't have this for Objective-C either. Nimble has the same behaviour as XCTest when it comes to type safety in Swift and Objective-C so it's a bad comparison.

@modocache
Copy link
Member

modocache added a commit that referenced this pull request Dec 17, 2014
[README] XCTest has type safety like Nimble
@modocache modocache merged commit 992a1f0 into Quick:master Dec 17, 2014
phatblat pushed a commit to phatblat/Nimble that referenced this pull request May 3, 2020
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