1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
4
5TestCase := Rectangle {
6 width: 100px;
7 height: 200px;
8
9 r := Rectangle {
10 width <=> root.width;
11 height <=> root.height;
12 }
13
14 property<bool> test: r.width == 100px && r.height == 200px;
15}
16
17/*
18```rust
19let instance = TestCase::new().unwrap();
20assert!(instance.get_test());
21```
22
23```cpp
24auto handle = TestCase::create();
25const TestCase &instance = *handle;
26assert(instance.get_test());
27```
28
29```js
30let instance = new slint.TestCase({});
31assert(instance.test, 1);
32```
33
34*/
35