1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/types"# ] |
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 | TestCase := Rectangle { |
6 | property <TextWrap> hello: word-wrap; |
7 | property <bool> test: hello == TextWrap.word-wrap && hello != TextWrap.no-wrap && !(hello == TextWrap.no-wrap); |
8 | } |
9 | |
10 | /* |
11 | ```cpp |
12 | auto handle = TestCase::create(); |
13 | const TestCase &instance = *handle; |
14 | assert(instance.get_test()); |
15 | ``` |
16 | |
17 | ```rust |
18 | let instance = TestCase::new().unwrap(); |
19 | assert!(instance.get_test()); |
20 | ``` |
21 | |
22 | ```js |
23 | var instance = new slint.TestCase({}); |
24 | assert(instance.test); |
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 instance = TestCase::new().unwrap(); |
33 | assert!(instance.get_test()); |
34 | Ok(()) |
35 | } |