Skip to content

Commit cb7bc98

Browse files
ktosotshortli
authored andcommitted
[StdlibUnittest] Warn if no tests were executed
1 parent 9fd0e92 commit cb7bc98

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,9 @@ class _ParentProcess {
16081608
_testSuiteFailedCallback()
16091609
} else {
16101610
print("\(testSuite.name): All tests passed")
1611+
if testSuite._tests.isEmpty {
1612+
print("WARNING: SUITE '\(testSuite.name)' CONTAINED NO TESTS! NO TESTS WERE EXECUTED!")
1613+
}
16111614
}
16121615
}
16131616
let (failed: failedOnShutdown, ()) = _shutdownChild()

0 commit comments

Comments
 (0)