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

[SR-14512] Duplicate __allTests__ array when extending a XCTestCase class on Linux #56864

Closed
adam-fowler opened this issue Apr 20, 2021 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@adam-fowler
Copy link

Previous ID SR-14512
Radar rdar://problem/76906852
Original Reporter @adam-fowler
Type Bug
Status Closed
Resolution Duplicate
Environment

Swift version 5.5-dev (LLVM fb5a91b4e892ed9, Swift f171428)
Target: x86_64-unknown-linux-gnu

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 5855abd8c321efff250f929c6c0d89e7

duplicates:

  • SR-11951 Test discovery on Linux breaks with test class extensions in multiple files

Issue Description:

With the latest Swift snapshot as of 2021-04-20, if you have a XCTestCase class

class MyTests: XCTestCase {
    func myTest() {}
}

and then extend it in another file

extension MyTests {
    func mySecondTest() {}
}

The Linux version of the compiler will generate the following error

error: invalid redeclaration of '__allTests__MyTests'
    static let __allTests__MyTests = [
@typesanitizer
Copy link

@swift-ci create

@tomerd
Copy link
Member

tomerd commented Apr 23, 2021

thanks for reporting @adam-fowler, seems the same as https://bugs.swift.org/browse/SR-11951, right?

@adam-fowler
Copy link
Author

@tomerd yep that looks the same

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Projects
None yet
Development

No branches or pull requests

3 participants