ladybird/Tests/LibWeb/TestLibWebSwiftBindings.swift
Andrew Kaster 10a2cc3781 Tests: Use Swift.String extension instead of manual conversion
This fixes a build error with Swift 6.0 on macOS.
2024-10-14 16:55:09 -04:00

24 lines
539 B
Swift

/*
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import AK
import Testing
import Web
@Suite
struct TestLibWebSwiftBindings {
@Test func enumsAreBound() {
#expect(Web.DOM.NodeType.ELEMENT_NODE.rawValue == 1)
#expect(Web.Bindings.NavigationType.Push.rawValue == 0)
let end = Web.Bindings.idl_enum_to_string(Web.Bindings.ScrollLogicalPosition.End)
let end_string = Swift.String(akString: end)!
#expect(end_string == "end")
}
}