Files
swift-mirror/test/Interop/Cxx/class/constructors-diagnostics.swift
finagolfin 21d90c5a41 [test] Fix or disable tests for 32-bit platforms (#82501)
Fix two IRGen tests that are failing on Android armv7 and disable eight ClangImporter, C++ Interop, and SILOptimizer tests, two of which that were already failing on other 32-bit platforms.
2025-07-11 16:20:08 +05:30

29 lines
3.6 KiB
Swift

// RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs %s -cxx-interoperability-mode=default -disable-availability-checking -verify-additional-file %S/Inputs/constructors.h -Xcc -Wno-nullability-completeness
// This test uses -verify-additional-file, which do not work well on Windows.
// UNSUPPORTED: OS=windows-msvc
// XFAIL: OS=linux-androideabi
import Constructors
let _ = SwiftInitSynthesisForCXXRefTypes.PlacementOperatorNew() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.PlacementOperatorNew' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.PrivateOperatorNew() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.PrivateOperatorNew' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.ProtectedOperatorNew() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.ProtectedOperatorNew' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.DeletedOperatorNew() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.DeletedOperatorNew' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.PrivateCtor() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.PrivateCtor' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.ProtectedCtor() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.ProtectedCtor' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.DeletedCtor() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.DeletedCtor' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg(1) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg(1, 2) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg(1) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg(1, 2) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg(1, 2, 3) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.CtorWithDefaultAndNonDefaultArg' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.VariadicCtors() // expected-error {{'SwiftInitSynthesisForCXXRefTypes.VariadicCtors' cannot be constructed because it has no accessible initializers}}
let _ = SwiftInitSynthesisForCXXRefTypes.VariadicCtors(1) // expected-error {{'SwiftInitSynthesisForCXXRefTypes.VariadicCtors' cannot be constructed because it has no accessible initializers}}