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 | export component TestCase { |
5 | rect := Rectangle { |
6 | border-radius: 45px; |
7 | border-top-left-radius: 98px; |
8 | } |
9 | |
10 | out property<bool> tl_ok: rect.border-top-left-radius == 98px; |
11 | out property<bool> tr_ok: rect.border-top-right-radius == 45px; |
12 | out property<bool> br_ok: rect.border-bottom-right-radius == 45px; |
13 | out property<bool> bl_ok: rect.border-bottom-left-radius == 45px; |
14 | |
15 | out property<bool> test: tl_ok && tr_ok && br_ok && bl_ok; |
16 | } |
17 | |
18 | /* |
19 | |
20 | ```cpp |
21 | auto handle = TestCase::create(); |
22 | const TestCase &instance = *handle; |
23 | assert(instance.get_test()); |
24 | ``` |
25 | |
26 | |
27 | ```rust |
28 | let instance = TestCase::new().unwrap(); |
29 | assert!(instance.get_test()); |
30 | ``` |
31 | |
32 | |
33 | ```js |
34 | var instance = new slint.TestCase({}); |
35 | assert(instance.test); |
36 | ``` |
37 | |
38 | */ |
39 | |