From 3725a67797dc7338492b8ac53f6b5acffa48b909 Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 28 Apr 2024 02:25:21 +0800 Subject: [PATCH] Fix test case of UIHostingControllerTests.swift --- .../UIKit/UIHostingControllerTests.swift | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Tests/OpenSwiftUICompatibilityTests/Integration/UIKit/UIHostingControllerTests.swift b/Tests/OpenSwiftUICompatibilityTests/Integration/UIKit/UIHostingControllerTests.swift index 2f9cc86..50303ba 100644 --- a/Tests/OpenSwiftUICompatibilityTests/Integration/UIKit/UIHostingControllerTests.swift +++ b/Tests/OpenSwiftUICompatibilityTests/Integration/UIKit/UIHostingControllerTests.swift @@ -8,10 +8,12 @@ import UIKit @MainActor struct UIHostingControllerTests { - @Test("BodyAccessor crash for non empty View instance", .bug("#81", relationship: .verifiesFix)) - func testBasicAnyViewWithProperty() throws { + @Test( + "Attribute setter crash for basic AnyView", + .bug("https://github.com/OpenSwiftUIProject/OpenGraph/issues/58", relationship: .verifiesFix) + ) + func testBasicAnyView() throws { struct ContentView: View { - var name = "" var body: some View { AnyView(EmptyView()) } @@ -20,9 +22,12 @@ struct UIHostingControllerTests { vc.triggerLayout() workaroundIssue87(vc) } - - @Test("BodyAccessor crash for non empty View instance", .bug("#81", relationship: .verifiesFix)) - func basicAnyViewWithProperty() throws { + + @Test( + "BodyAccessor crash for non empty View instance", + .bug("#81", relationship: .verifiesFix) + ) + func testBasicAnyViewWithProperty() throws { struct ContentView: View { var name = "" var body: some View {