Files
swift-mirror/test/stdlib/mmap.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

21 lines
383 B
Swift

// RUN: %target-run-simple-swift %t
// REQUIRES: executable_test
// UNSUPPORTED: OS=windows-msvc
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()