diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 5af51c8..cc4aa14 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -62,4 +62,4 @@ jobs: xcrun xcodebuild -configuration ${{ matrix.configuration }} -scheme DummyTestee -destination 'platform=macOS' test - name: Swift Package Manager - run: swift test + run: swift test -Xswiftc -DBUILDING_WITH_SWIFT_PACKAGE_MANAGER=1 diff --git a/Tests/Tests.swift b/Tests/Tests.swift index dca2564..54ccca9 100644 --- a/Tests/Tests.swift +++ b/Tests/Tests.swift @@ -28,11 +28,14 @@ struct StructsAreNotTestCases { XCTFail("This shouldn't run") } + // Work around https://github.com/apple/swift-package-manager/issues/7411 + #if !os(Windows) && !os(Linux) || !BUILD_WITH_SWIFT_PACKAGE_MANAGER class NestedStructClassesCanBeTestCases: XCTestCase { func testNestedClassMethodsCanBeTests() {} } + #endif } @@ -42,11 +45,14 @@ enum EnumsAreNotTestCases { XCTFail("This shouldn't run") } + // Work around https://github.com/apple/swift-package-manager/issues/7411 + #if !os(Windows) && !os(Linux) || !BUILD_WITH_SWIFT_PACKAGE_MANAGER class NestedEnumClassesCanBeTestCases: XCTestCase { func testNestedClassMethodsCanBeTests() {} } + #endif }