Skip to content

[Test] Disable existentials_objc.swift when testing against OS libraries. #24921

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions validation-test/Reflection/existentials_objc.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/existentials_objc
// RUN: %target-codesign %t/existentials_objc
// RUN: %target-run %target-swift-reflection-test %t/existentials_objc | %FileCheck %s
// RUN: %target-run %target-swift-reflection-test %t/existentials_objc > %t.txt
// RUN: grep SkipTheTest %t.txt || %FileCheck %s < %t.txt

// REQUIRES: objc_interop
// REQUIRES: executable_test
Expand All @@ -15,15 +16,21 @@ import Foundation

import SwiftReflectionTest

// Imported class wrapped in AnyObject

// CHECK: Type reference:
// CHECK: (objective_c_class name=NSObject)
reflect(object: NSObject())

// Tagged pointer wrapped in AnyObject
// CHECK: Type reference:
// CHECK: (objective_c_class name=__NSCFNumber)
reflect(object: NSNumber(123))
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
// Imported class wrapped in AnyObject

// CHECK: Type reference:
// CHECK: (objective_c_class name=NSObject)
reflect(object: NSObject())

// Tagged pointer wrapped in AnyObject
// CHECK: Type reference:
// CHECK: (objective_c_class name=__NSCFNumber)
reflect(object: NSNumber(123))
} else {
// The Swift 5.0 libraries don't support this test.
class SkipTheTest {}
reflect(object: SkipTheTest())
}

doneReflecting()