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 Test-Case := Rectangle {
5
6 property<length> property-x1: xxx-foo.border-width;
7 property<length> property-x2: xxx_foo.border_width;
8
9 xxx-foo := Rectangle {
10 border-width: 42phx;
11 }
12
13 property<int> hello-42: 42;
14 property<int> hello--world: -hello-42 - 2; // -42 - 2 = -44
15 property<int> this--has-6-slashes--: 42-hello--world; // 42 - -44 = 86
16
17}
18/*
19```cpp
20auto handle = Test_Case::create();
21const Test_Case &instance = *handle;
22assert_eq(instance.get_property_x1(), 42);
23assert_eq(instance.get_property_x2(), 42);
24assert_eq(instance.get_this__has_6_slashes__(), 86);
25```
26
27```rust
28let instance = Test_Case::new().unwrap();
29assert_eq!(instance.get_property_x1(), 42.);
30assert_eq!(instance.get_property_x2(), 42.);
31assert_eq!(instance.get_this__has_6_slashes__(), 86);
32```
33
34```js
35var instance = new slint.Test_Case({});
36assert.equal(instance.property_x1, 42);
37assert.equal(instance.property_x2, 42);
38assert.equal(instance.this__has_6_slashes__, 86);
39```
40*/
41