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
7 width: 100px;
8 height: 200px;
9
10 r := Rectangle {
11 // default geometry for width & height
12 animate height { duration: 1s; }
13 animate width { duration: 1s; }
14 }
15
16 property<bool> test: r.width == 100px && r.height == 200px;
17}
18
19/*
20```rust
21let instance = TestCase::new().unwrap();
22assert!(instance.get_test());
23```
24
25```cpp
26auto handle = TestCase::create();
27const TestCase &instance = *handle;
28assert(instance.get_test());
29```
30
31```js
32let instance = new slint.TestCase({});
33assert(instance.test, 1);
34```
35
36*/
37