1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial |
3 | |
4 | TestCase := Rectangle { |
5 | property <TextWrap> hello: word-wrap; |
6 | property <bool> test: hello == TextWrap.word-wrap && hello != TextWrap.no-wrap && !(hello == TextWrap.no-wrap); |
7 | } |
8 | |
9 | /* |
10 | ```cpp |
11 | auto handle = TestCase::create(); |
12 | const TestCase &instance = *handle; |
13 | assert(instance.get_test()); |
14 | ``` |
15 | |
16 | ```rust |
17 | let instance = TestCase::new().unwrap(); |
18 | assert!(instance.get_test()); |
19 | ``` |
20 | |
21 | ```js |
22 | var instance = new slint.TestCase({}); |
23 | assert(instance.test); |
24 | ``` |
25 | */ |
26 | |