mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Certain traps can't be supported on WASI, such as expectations for crashes, `setjmp` use, dynamic linking, multi-threading etc. These tests are marked as `UNSUPPORTED` when targeting Wasm/WASI.
22 lines
407 B
Swift
22 lines
407 B
Swift
// RUN: %target-run-simple-swift %t
|
|
// REQUIRES: executable_test
|
|
// UNSUPPORTED: OS=windows-msvc
|
|
// UNSUPPORTED: OS=wasi
|
|
|
|
import StdlibUnittest
|
|
#if canImport(Darwin)
|
|
import Darwin
|
|
#elseif canImport(Glibc)
|
|
import Glibc
|
|
#else
|
|
#error("Unsupported platform")
|
|
#endif
|
|
|
|
var MMapTests = TestSuite("MMaptests")
|
|
|
|
MMapTests.test("MAP_FAILED") {
|
|
expectEqual(mmap(nil, 0, 0, 0, 0, 0), MAP_FAILED)
|
|
}
|
|
|
|
runAllTests()
|