mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Clang importer is unable to handle `((void *)-1)`, therefore manually declaring the said constant in both Darwin and Glibc modules. rdar://problem/26689135
18 lines
287 B
Swift
18 lines
287 B
Swift
// RUN: %target-run-simple-swift %t
|
|
// REQUIRES: executable_test
|
|
|
|
import StdlibUnittest
|
|
#if os(Linux)
|
|
import Glibc
|
|
#else
|
|
import Darwin
|
|
#endif
|
|
|
|
var MMapTests = TestSuite("MMaptests")
|
|
|
|
MMapTests.test("MAP_FAILED") {
|
|
expectEqual(mmap(nil, 0, 0, 0, 0, 0), MAP_FAILED)
|
|
}
|
|
|
|
runAllTests()
|