Files
swift-mirror/validation-test/StdlibUnittest/ChildProcessShutdown/PassIfChildCrashedDuringTestExecution.swift
Robert Widmann cddf73ecdb [Gardening] Clean Up OS-Test Patterns Across The Codebase
Clean up a few general patterns that are now obviated by canImport

This aligns more generally with the cleanup that the Swift Package
Manager has already done in their automated XCTest-plumbing tool in
apple/swift-package-manager#1826.
2020-06-30 22:55:58 -07:00

29 lines
568 B
Swift

// RUN: %target-run-simple-swift
// REQUIRES: executable_test
import StdlibUnittest
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif os(Windows)
import MSVCRT
#else
#error("Unsupported platform")
#endif
//
// Test that harness correctly handles the case when there is no child process
// to terminate during shutdown because it crashed during test execution.
//
var TestSuiteChildCrashes = TestSuite("TestSuiteChildCrashes")
TestSuiteChildCrashes.test("passes") {
expectCrashLater()
fatalError("crash")
}
runAllTests()