Files
swift-mirror/test/stdlib/mmap.swift
3405691582 4a36a4b6c5 [test] Setup testing for OpenBSD.
This commit focuses the basics: setting up the relevant stanzas in
lit.cfg and adding platform conditionals for importing Glibc. Future
commits will deal with other portability fixes.
2020-03-23 20:47:31 -04:00

21 lines
489 B
Swift

// RUN: %target-run-simple-swift %t
// REQUIRES: executable_test
// UNSUPPORTED: OS=windows-msvc
import StdlibUnittest
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Darwin
#elseif os(Linux) || os(FreeBSD) || os(OpenBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
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()