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<bool> truevar: true; |
6 | property<bool> falsevar: false; |
7 | } |
8 | /* |
9 | ```cpp |
10 | auto handle = TestCase::create(); |
11 | const TestCase &instance = *handle; |
12 | assert(instance.get_truevar()); |
13 | assert(!instance.get_falsevar()); |
14 | ``` |
15 | |
16 | |
17 | ```rust |
18 | let instance = TestCase::new().unwrap(); |
19 | assert!(instance.get_truevar()); |
20 | assert!(!instance.get_falsevar()); |
21 | ``` |
22 | |
23 | ```js |
24 | var instance = new slint.TestCase({}); |
25 | assert(instance.truevar); |
26 | assert(!instance.falsevar); |
27 | ``` |
28 | */ |
29 | |