Files
swift-mirror/test/stdlib/WASILibcAPI.swift
2025-07-23 10:10:47 +01:00

20 lines
391 B
Swift

// RUN: %target-swift-frontend -typecheck -swift-version 6 %s -verify
// REQUIRES: executable_test
// REQUIRES: OS=wasip1
import WASILibc
// errno is a global thread-local variable, so it should be accessible
// from any context.
enum TestErrno {
static func testSyncContext() {
_ = errno
errno = 0
}
static func testAsyncContext() async {
_ = errno
errno = 0
}
}