Files
swift-mirror/validation-test/stdlib/Glibc.swift
Daniel Rodríguez Troitiño 1813cc3670 [android] Enable some tests that should pass on Android.
Some tests are limited to only Linux, when they should also pass for
Android.

Additionally, InputStream.swift.gyb was disabled for Android ARMv7, but
wasn't for Android AArch64, which allow me to find the error on it and
fix it on #24521.

Finally, StringLowercasedUppercased is interesting in Android because it
checks the used ICU is correct for performing the tasks that the stdlib
needs.
2019-05-06 17:53:51 -07:00

38 lines
758 B
Swift

// RUN: %target-run-simple-swift
// REQUIRES: executable_test
//
// UNSUPPORTED: OS=macosx
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos
// UNSUPPORTED: OS=watchos
// REQUIRES-ANY: OS=linux-gnu, OS=linux-androideabi, OS=linux-android
import Swift
import StdlibUnittest
import Glibc
var GlibcTestSuite = TestSuite("Glibc")
GlibcTestSuite.test("errno") {
errno = 0
expectEqual(0, errno)
close(-1)
expectEqual(EBADF, errno)
}
GlibcTestSuite.test("sendfile") {
// Check that `sendfile` is available. Don't actually call it, because doing that is non-trivial.
_ = sendfile
}
var GlibcIoctlConstants = TestSuite("GlibcIoctlConstants")
GlibcIoctlConstants.test("tty ioctl constants availability") {
let aConstant = TIOCSTI
}
runAllTests()