1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/crashes"# ] |
2 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
3 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial |
4 | |
5 | Button := Text { } |
6 | |
7 | PanelButton := HorizontalLayout { |
8 | property<string> button-text <=> button.text; |
9 | button := Button { } |
10 | } |
11 | |
12 | TestCase := Window { |
13 | property <bool> test: pb.preferred-height == control.preferred-height; |
14 | pb := PanelButton { button-text: "button1" ; } |
15 | control := Text { text: "button1" ; } |
16 | } |
17 | |
18 | |
19 | /* |
20 | |
21 | ```rust |
22 | let ui = TestCase::new().unwrap(); |
23 | assert!(ui.get_test()); |
24 | ``` |
25 | |
26 | */ |
27 | } |
28 | |
29 | #[test ] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> { |
30 | use i_slint_backend_testing as slint_testing; |
31 | slint_testing::init(); |
32 | let ui = TestCase::new().unwrap(); |
33 | assert!(ui.get_test()); |
34 | Ok(()) |
35 | } |