From eda79789e14f1ac951f25b304ef3868b05b6f564 Mon Sep 17 00:00:00 2001 From: Stuart Montgomery Date: Mon, 4 Nov 2024 09:53:38 -0600 Subject: [PATCH] Test cleanup: Remove an obsolete fixture suite and add .hidden to a few tests --- Tests/TestingTests/ExitTestTests.swift | 2 +- Tests/TestingTests/MiscellaneousTests.swift | 2 ++ Tests/TestingTests/PlanTests.swift | 14 -------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Tests/TestingTests/ExitTestTests.swift b/Tests/TestingTests/ExitTestTests.swift index 7fd3e4dcf..73fcfbb30 100644 --- a/Tests/TestingTests/ExitTestTests.swift +++ b/Tests/TestingTests/ExitTestTests.swift @@ -439,7 +439,7 @@ private import _TestingInternals } #if false // intentionally fails to compile -@Test(arguments: 100 ..< 200) +@Test(.hidden, arguments: 100 ..< 200) func sellIceCreamCones(count: Int) async throws { try await #require(exitsWith: .failure) { precondition(count < 10, "Too many ice cream cones") diff --git a/Tests/TestingTests/MiscellaneousTests.swift b/Tests/TestingTests/MiscellaneousTests.swift index 33980cf38..eebdf8575 100644 --- a/Tests/TestingTests/MiscellaneousTests.swift +++ b/Tests/TestingTests/MiscellaneousTests.swift @@ -224,11 +224,13 @@ struct TestsWithAsyncArguments { } @Test( + .hidden, arguments: [0] // Meaningful trivia: This line comment should be omitted during macro expansion ) func parameterizedTestWithTrailingComment(value: Int) {} @Suite( + .hidden, .serialized // Meaningful trivia: This line comment should be omitted during macro expansion ) private struct SuiteWithTraitContainingTrailingComment {} diff --git a/Tests/TestingTests/PlanTests.swift b/Tests/TestingTests/PlanTests.swift index 52f3081b0..2922c1454 100644 --- a/Tests/TestingTests/PlanTests.swift +++ b/Tests/TestingTests/PlanTests.swift @@ -456,20 +456,6 @@ private struct DummyRecursiveTrait: TestTrait, SuiteTrait { } } -struct IndependentlyRunnableTests { - struct A { - @Suite(.hidden) struct B { - @Test(.hidden) func c() {} - struct D { - @Test(.hidden) func e() {} - } - } - @Suite(.hidden) struct F { - @Test(.hidden) func g() {} - } - } -} - @Suite(.hidden) struct RelativeTraitOrderingTests { @Suite(.hidden, BasicRecursiveTrait("A"))