Files
swift-mirror/test/stdlib/mmap.swift
Max Desiatov 04b47d7bdc test: mark a few tests as unsupported on Wasm/WASI (#39504)
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.
2021-09-29 16:25:38 +01:00

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()