Thanks to this commit <https://github.com/apple/swift/commit/ad269b0e1fbc12037ae2c16634b5b451061657c6> it looks as if IsTestCandidate has been moved out of SourceKit and into libIndex:
- isTestCandidate(swift::ValueDecl) <https://github.com/apple/swift/blob/8dad7f780347788f6032ad9e25ce5340aecf4073/lib/Index/Index.cpp#L754> - swift::index::FuncDeclIndexSymbol.IsTestCandidate <https://github.com/apple/swift/blob/41e4e9b6efc745f04df23bd6a803a467c57a66b8/include/swift/Index/IndexSymbol.h#L102> and where it’s set <https://github.com/apple/swift/blob/8dad7f780347788f6032ad9e25ce5340aecf4073/lib/Index/Index.cpp#L786> . I’m looking into adding an option to swiftc to emit XCTest candidate methods. How does swiftc -frontend -dump-xctest-methods sound? - Brian Gesiak On Sun, Apr 17, 2016 at 5:50 PM, Drew Crawford <d...@sealedabstract.com> wrote: > > On Apr 3, 2016, at 10:05 PM, Dmitri Gribenko <griboz...@gmail.com> wrote: > > Hmm... but then wouldn't that more tightly couple the test discovery tool > and the Swift compiler? In an earlier email you said you "like #3 better > [...] because that would decouple the test discovery tool from the Swift > compiler." I think that part is confusing me. > > > Sorry -- what I meant is that the compiler remains the point of truth > about the language and can find the tests. The tools that actually > generate glue code won't need to parse code, and would be decoupled > from the compiler. > > > I am internally shipping a test framework that discovers tests via an > out-of-tree parser. Teaching swiftc about XCTest syntax is not sufficient > to deprecate my parser, and therefore is not sufficient for the compiler to > be the source of truth for my tests. >
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev