20 lines
763 B
Plaintext
20 lines
763 B
Plaintext
@testable import Core
|
||
@testable import A_
|
||
import XCTest
|
||
|
||
//TODO get this to run on CI and don’t have it committed
|
||
//NOTE problem is Sourcery doesn’t support Linux currently
|
||
//USAGE: cd PromiseKit/Sources/.. && sourcery --config .github/sourcery.yml
|
||
|
||
{% for type in types.classes|based:"XCTestCase" %}
|
||
extension {{ type.name }} {
|
||
static var allTests = [
|
||
{% for method in type.methods %}{% if method.parameters.count == 0 and method.shortName|hasPrefix:"test" %} ("{{ method.shortName }}", {{type.name}}.{{ method.shortName }}),
|
||
{% endif %}{% endfor %}]
|
||
}
|
||
|
||
{% endfor %}
|
||
XCTMain([
|
||
{% for type in types.classes|based:"XCTestCase" %}{% if not type.annotations.excludeFromLinuxMain %} testCase({{ type.name }}.allTests),
|
||
{% endif %}{% endfor %}])
|