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//include_path: ../../helper_components
5import { UseGlobal } from "export_globals.slint";
6TestCase := Rectangle {
7 ug := UseGlobal {}
8 property<int> p1: ug.used42;
9 property<int> p2: ug.used44;
10}
11/*
12
13```cpp
14auto handle = TestCase::create();
15const TestCase &instance = *handle;
16assert_eq(instance.get_p1(), 42);
17assert_eq(instance.get_p2(), 44);
18```
19
20```rust
21let instance = TestCase::new().unwrap();
22assert_eq!(instance.get_p1(), 42);
23assert_eq!(instance.get_p2(), 44);
24```
25
26```js
27var instance = new slint.TestCase({});
28assert.equal(instance.p1, 42);
29assert.equal(instance.p2, 44);
30```
31
32*/
33