From c63d181b2592d0b62d3273c1588f344a50564eda Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Fri, 15 Mar 2024 10:55:40 -0700 Subject: [PATCH 1/2] Add some progress info to make failures here easier to understand --- test/Interpreter/builtin_bridge_object.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Interpreter/builtin_bridge_object.swift b/test/Interpreter/builtin_bridge_object.swift index 6dd60c7c8ef87..5111694b75e12 100644 --- a/test/Interpreter/builtin_bridge_object.swift +++ b/test/Interpreter/builtin_bridge_object.swift @@ -61,6 +61,7 @@ func nonPointerBits(_ x: Builtin.BridgeObject) -> UInt { // Try without any bits set. if true { + print("No bits set") // CHECK-NEXT: No bits set let x = C() let bo = Builtin.castToBridgeObject(x, 0._builtinWordValue) let bo2 = bo @@ -88,6 +89,7 @@ if true { // Try with all spare bits set. if true { + print("All spare bits set") // CHECK-NEXT: All spare bits set let x = C() let bo = Builtin.castToBridgeObject(x, NATIVE_SPARE_BITS._builtinWordValue) @@ -126,6 +128,7 @@ func nonNativeBridgeObject(_ o: AnyObject) -> Builtin.BridgeObject { // Try with a (probably) tagged pointer. No bits may be masked into a // non-native object. if true { + print("Tagged pointer") // CHECK-NEXT: Tagged pointer let x = NSNumber(value: 22) let bo = nonNativeBridgeObject(x) let bo2 = bo @@ -148,6 +151,7 @@ var unTaggedString: NSString { // Try with an un-tagged pointer. if true { + print("Untagged pointer") // CHECK-NEXT: Untagged pointer let x = unTaggedString let bo = nonNativeBridgeObject(x) let bo2 = bo @@ -184,6 +188,8 @@ func hitOptionalSpecifically(_ x: Builtin.BridgeObject?) { } if true { + print("BridgeObject") // CHECK-NEXT: BridgeObject + // CHECK-NEXT: true print(MemoryLayout>.size == MemoryLayout.size) From fe82cde490f69e63fd78b4625d06ea401cc9e1ec Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 1 Aug 2024 07:32:48 -0700 Subject: [PATCH 2/2] Use CHECK for general synchronization --- test/Interpreter/builtin_bridge_object.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Interpreter/builtin_bridge_object.swift b/test/Interpreter/builtin_bridge_object.swift index 5111694b75e12..7499fc43812cb 100644 --- a/test/Interpreter/builtin_bridge_object.swift +++ b/test/Interpreter/builtin_bridge_object.swift @@ -61,7 +61,7 @@ func nonPointerBits(_ x: Builtin.BridgeObject) -> UInt { // Try without any bits set. if true { - print("No bits set") // CHECK-NEXT: No bits set + print("No bits set") // CHECK: No bits set let x = C() let bo = Builtin.castToBridgeObject(x, 0._builtinWordValue) let bo2 = bo @@ -89,7 +89,7 @@ if true { // Try with all spare bits set. if true { - print("All spare bits set") // CHECK-NEXT: All spare bits set + print("All spare bits set") // CHECK: All spare bits set let x = C() let bo = Builtin.castToBridgeObject(x, NATIVE_SPARE_BITS._builtinWordValue) @@ -128,7 +128,7 @@ func nonNativeBridgeObject(_ o: AnyObject) -> Builtin.BridgeObject { // Try with a (probably) tagged pointer. No bits may be masked into a // non-native object. if true { - print("Tagged pointer") // CHECK-NEXT: Tagged pointer + print("Tagged pointer") // CHECK: Tagged pointer let x = NSNumber(value: 22) let bo = nonNativeBridgeObject(x) let bo2 = bo @@ -151,7 +151,7 @@ var unTaggedString: NSString { // Try with an un-tagged pointer. if true { - print("Untagged pointer") // CHECK-NEXT: Untagged pointer + print("Untagged pointer") // CHECK: Untagged pointer let x = unTaggedString let bo = nonNativeBridgeObject(x) let bo2 = bo @@ -188,7 +188,7 @@ func hitOptionalSpecifically(_ x: Builtin.BridgeObject?) { } if true { - print("BridgeObject") // CHECK-NEXT: BridgeObject + print("BridgeObject") // CHECK: BridgeObject // CHECK-NEXT: true print(MemoryLayout>.size