Tests: Use Swift.String extension instead of manual conversion

This fixes a build error with Swift 6.0 on macOS.
This commit is contained in:
Andrew Kaster 2024-10-14 13:13:42 -06:00 committed by Tim Flynn
parent 329e9ed820
commit 10a2cc3781
Notes: github-actions[bot] 2024-10-14 20:56:01 +00:00

View file

@ -17,8 +17,7 @@ struct TestLibWebSwiftBindings {
#expect(Web.Bindings.NavigationType.Push.rawValue == 0) #expect(Web.Bindings.NavigationType.Push.rawValue == 0)
let end = Web.Bindings.idl_enum_to_string(Web.Bindings.ScrollLogicalPosition.End) let end = Web.Bindings.idl_enum_to_string(Web.Bindings.ScrollLogicalPosition.End)
let end_view = end.__bytes_as_string_viewUnsafe().bytes() let end_string = Swift.String(akString: end)!
let end_string = Swift.String(bytes: end_view, encoding: .utf8)!
#expect(end_string == "end") #expect(end_string == "end")
} }