Skip to content

Commit e32d221

Browse files
committed
[StdlibUnittest] Warn if no tests were executed
1 parent b2f5252 commit e32d221

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
@@ -1588,6 +1588,9 @@ class _ParentProcess {
15881588
_testSuiteFailedCallback()
15891589
} else {
15901590
print("\(testSuite.name): All tests passed")
1591+
if testSuite._tests.isEmpty {
1592+
print("WARNING: SUITE '\(testSuite.name)' CONTAINED NO TESTS! NO TESTS WERE EXECUTED!")
1593+
}
15911594
}
15921595
}
15931596
let (failed: failedOnShutdown, ()) = _shutdownChild()

0 commit comments

Comments
 (0)