Skip to content

Disable attachment test until attachments are formally released #1412

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
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,9 @@ final class DebugReleaseTestSuite: XCTestCase {
}
}

#if swift(>=6.1)
@_spi(Experimental) import Testing
#elseif swift(>=6.0)
#if swift(>=6.0)
import Testing
#endif

#if swift(>=6.0)
@Test func topLevelTestPassing() {
print("A print statement in a test.")
#if !TEST_ARGUMENT_SET_VIA_TEST_BUILD_ARGUMENTS_SETTING
Expand Down Expand Up @@ -112,11 +108,12 @@ struct MixedSwiftTestingSuite {
}
#endif

#if swift(>=6.1)
@Test func testAttachment() throws {
Attachment("Hello, world!", named: "hello.txt").attach()
}
#endif
// Disabled until Attachments are formalized and released.
// #if swift(>=6.1)
// @Test func testAttachment() throws {
// Attachment("Hello, world!", named: "hello.txt").attach()
// }
// #endif

final class DuplicateSuffixTests: XCTestCase {
func testPassing() throws {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ suite("Test Explorer Suite", function () {
"testWithKnownIssue()",
"testWithKnownIssueAndUnknownIssue()",
"testLotsOfOutput()",
"testAttachment()",
"DuplicateSuffixTests",
["testPassing()", "testPassingSuffix()"],
],
Expand Down Expand Up @@ -255,7 +254,8 @@ suite("Test Explorer Suite", function () {
);
});

test("attachments", async function () {
// Disabled until Attachments are formalized and released.
test.skip("attachments", async function () {
// Attachments were introduced in 6.1
if (workspaceContext.swiftVersion.isLessThan(new Version(6, 1, 0))) {
this.skip();
Expand Down Expand Up @@ -624,8 +624,8 @@ suite("Test Explorer Suite", function () {

assertTestResults(testRun, {
passed: [
`${testId}/PackageTests.swift:63:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [49])])`,
`${testId}/PackageTests.swift:63:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [51])])`,
`${testId}/PackageTests.swift:59:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [49])])`,
`${testId}/PackageTests.swift:59:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [51])])`,
],
failed: [
{
Expand All @@ -635,7 +635,7 @@ suite("Test Explorer Suite", function () {
text: "Expectation failed: (arg → 2) != 2",
})}`,
],
test: `${testId}/PackageTests.swift:63:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [50])])`,
test: `${testId}/PackageTests.swift:59:2/argumentIDs: Optional([Testing.Test.Case.Argument.ID(bytes: [50])])`,
},
{
issues: [],
Expand Down
Loading