Files
swift-mirror/test/stdlib/MathConstants.swift
Dmitrii Galimzianov a8b71ea97f Add -print-diagnostic-groups flag
This change adds the `-print-diagnostic-groups` flag as described by SE-0443.
2024-09-11 13:34:42 +02:00

23 lines
1011 B
Swift

// RUN: %target-typecheck-verify-swift -print-diagnostic-groups
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif os(WASI)
import WASILibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else
#error("Unsupported platform")
#endif
_ = M_PI // expected-warning {{is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting. [availability_deprecated]}}
_ = M_PI_2 // expected-warning {{is deprecated: Please use 'Double.pi / 2' or '.pi / 2' to get the value of correct type and avoid casting. [availability_deprecated]}}
_ = M_PI_4 // expected-warning {{is deprecated: Please use 'Double.pi / 4' or '.pi / 4' to get the value of correct type and avoid casting. [availability_deprecated]}}
_ = M_SQRT2 // expected-warning {{is deprecated: Please use '2.squareRoot()'. [availability_deprecated]}}
_ = M_SQRT1_2 // expected-warning {{is deprecated: Please use '0.5.squareRoot()'. [availability_deprecated]}}