2024-08-18 02:58:59 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Andrew Kaster <andrew@ladybird.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
import AK
|
2024-08-27 07:57:13 +00:00
|
|
|
import Testing
|
2024-08-29 04:35:29 +00:00
|
|
|
import Web
|
2024-08-18 02:58:59 +00:00
|
|
|
|
2024-08-27 07:57:13 +00:00
|
|
|
@Suite
|
2024-08-18 02:58:59 +00:00
|
|
|
struct TestLibWebSwiftBindings {
|
|
|
|
|
2024-08-27 07:57:13 +00:00
|
|
|
@Test func enumsAreBound() {
|
|
|
|
#expect(Web.DOM.NodeType.ELEMENT_NODE.rawValue == 1)
|
2024-08-18 02:58:59 +00:00
|
|
|
|
2024-08-27 07:57:13 +00:00
|
|
|
#expect(Web.Bindings.NavigationType.Push.rawValue == 0)
|
2024-08-18 02:58:59 +00:00
|
|
|
|
|
|
|
let end = Web.Bindings.idl_enum_to_string(Web.Bindings.ScrollLogicalPosition.End)
|
2024-10-14 19:13:42 +00:00
|
|
|
let end_string = Swift.String(akString: end)!
|
2024-08-18 02:58:59 +00:00
|
|
|
|
2024-08-27 07:57:13 +00:00
|
|
|
#expect(end_string == "end")
|
2024-08-18 02:58:59 +00:00
|
|
|
}
|
2024-08-18 02:16:16 +00:00
|
|
|
}
|