mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This change adds support for WASI in stdlib tests. Some tests that expect a crash to happen had to be disabled, since there's currently no way to observe such crash from a WASI host.
21 lines
479 B
Swift
21 lines
479 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
#if canImport(Darwin)
|
|
import Darwin
|
|
#elseif canImport(Glibc)
|
|
import Glibc
|
|
#elseif os(WASI)
|
|
import WASILibc
|
|
#elseif os(Windows)
|
|
import CRT
|
|
#else
|
|
#error("Unsupported platform")
|
|
#endif
|
|
|
|
_ = M_PI // expected-warning {{is deprecated}}
|
|
_ = M_PI_2 // expected-warning {{is deprecated}}
|
|
_ = M_PI_4 // expected-warning {{is deprecated}}
|
|
|
|
_ = M_SQRT2 // expected-warning {{is deprecated}}
|
|
_ = M_SQRT1_2 // expected-warning {{is deprecated}}
|