mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
21 lines
500 B
Swift
21 lines
500 B
Swift
// RUN: %target-run-simple-swift
|
|
// REQUIRES: executable_test
|
|
|
|
// REQUIRES: OS=linux-gnu
|
|
|
|
import StdlibUnittest
|
|
import CUUID
|
|
|
|
/// Make sure that the module map for the uuid.h header works
|
|
var CUUIDTestSuite = TestSuite("CUUID")
|
|
|
|
/// Generates a random UUID
|
|
CUUIDTestSuite.test("uuid") {
|
|
var uuid: uuid_t = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
withUnsafeMutablePointer(to: &uuid) {
|
|
uuid_generate_random(unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self))
|
|
}
|
|
}
|
|
|
|
runAllTests()
|