forked from swiftlang/swift-corelibs-foundation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stub for Testing module (swiftlang#5077)
* Add stub for Testing module * Fix indentation
- Loading branch information
1 parent
1b8c1ea
commit 4418280
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This source file is part of the Swift.org open source project | ||
// | ||
// Copyright (c) 2024 Apple Inc. and the Swift project authors | ||
// Licensed under Apache License v2.0 with Runtime Library Exception | ||
// | ||
// See http://swift.org/LICENSE.txt for license information | ||
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | ||
// | ||
|
||
#if canImport(Glibc) | ||
import Glibc | ||
#elseif canImport(Musl) | ||
import Musl | ||
#elseif os(WASI) | ||
import WASILibc | ||
#elseif canImport(CRT) | ||
import CRT | ||
#endif | ||
|
||
|
||
// This function is used to mimic a bare minimum of the swift-testing library. Since this package has no swift-testing tests, we simply exit. | ||
// The test runner will automatically call this function when running tests, so it must exit gracefully rather than using `fatalError()`. | ||
public func __swiftPMEntryPoint(passing _: (any Sendable)? = nil) async -> Never { | ||
exit(0) | ||
} |