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 | // issue #177 |
6 | |
7 | export TestCase := Window { |
8 | r := Rectangle { |
9 | background: blue; |
10 | } |
11 | property <bool> test: r.border-radius == 0; |
12 | } |
13 | |
14 | /* |
15 | |
16 | ```cpp |
17 | auto handle = TestCase::create(); |
18 | const TestCase &instance = *handle; |
19 | assert(instance.get_test()); |
20 | ``` |
21 | |
22 | ```rust |
23 | let instance = TestCase::new().unwrap(); |
24 | assert!(instance.get_test()); |
25 | ``` |
26 | |
27 | ```js |
28 | var instance = new slint.TestCase(); |
29 | assert(instance.test); |
30 | ``` |
31 | */ |
32 | } |
33 | |
34 | #[test ] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> { |
35 | use i_slint_backend_testing as slint_testing; |
36 | slint_testing::init(); |
37 | let instance = TestCase::new().unwrap(); |
38 | assert!(instance.get_test()); |
39 | Ok(()) |
40 | } |