Skip to content

Add cases .ObjCRuntime and .NativeRuntime to StdlibUnittest's TestPredicate #1130

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
Jan 29, 2016

Conversation

glessard
Copy link
Contributor

This predicate case evaluates to false #if _runtime(_ObjC), true otherwise.

@@ -1232,6 +1234,9 @@ public enum TestRunPredicate : CustomStringConvertible {

case FreeBSDAny(reason: let reason):
return "FreeBSDAny(*, reason: \(reason))"

case noObjC(let reason):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would phrase it avoiding the negation: case ObjCRuntime, case NativeRuntime. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that. Are you thinking two different cases, then?

@glessard
Copy link
Contributor Author

Replaced the .noObjC case by paired .ObjCRuntime and .NativeRuntime cases

@gribozavr While we're at it, I was wondering whether cases .Always and .Never should also exist. There are a lot of uses of .Custom({true}, "") around.

@glessard glessard force-pushed the noobjc-testpredicate branch from 2f67c89 to 6879dbd Compare January 29, 2016 03:17
@jrose-apple
Copy link
Contributor

I'd personally rather name these "Apple" and "NonApple", rather than using the presence of the runtime as a stand-in. (And if we start testing swift-corelibs-foundation on OS X as "non-objc-runtime", we'll need that distinction!)

@glessard
Copy link
Contributor Author

Seems to me that referring to the runtime is more precise; and your swift-corelibs-foundation aside appears to undermine the "Apple" and "NonApple" nomenclature. Surely I am misunderstanding?

@gribozavr
Copy link
Contributor

Let's deal with swift-corelibs-foundation distinction later. I'm not sure it will even come up, because this repository can't depend on corelibs-foundation -- that would be circular.

For now, for compile-time requirements and for lit REQUIRES tags we have been using the runtime distinction, and I would prefer to keep it the same everywhere, at least to eliminate the subtle differences.

I agree about .Always and .Never, could you submit that as a separate pull request?

@gribozavr
Copy link
Contributor

@swift-ci Please test

@glessard glessard changed the title Add a case .noObjC to StdlibUnittest's TestPredicate Add cases .ObjCRuntime and .NativeRuntime to StdlibUnittest's TestPredicate Jan 29, 2016
gribozavr added a commit that referenced this pull request Jan 29, 2016
Add cases .ObjCRuntime and .NativeRuntime to StdlibUnittest's TestPredicate
@gribozavr gribozavr merged commit fbbb42a into swiftlang:master Jan 29, 2016
@glessard glessard deleted the noobjc-testpredicate branch February 2, 2016 09:24
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