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 TestCase := Rectangle {
5 property <bool> verify:
6 sin(0) == 0 &&
7 cos(0) == 1 &&
8 round(1000* cos(360deg)) == 1000 && round(1000*sin(360deg)) == 0 &&
9 round(1000* sin(180deg)) == 0 && round(1000*cos(180deg)) == -1000 &&
10 round(1000 * sin(90deg)) == 1000 && round(1000*cos(90deg)) == 0 &&
11 round(atan(tan(45deg))/0.1deg) == 450 &&
12 round(asin(sin(45deg))/0.1deg) == 450 &&
13 round(acos(cos(45deg))/0.1deg) == 450 &&
14 atan2(0, 0) == 0 &&
15 atan2(0, 10) == 0deg &&
16 atan2(10, 10) == 45deg &&
17 atan2(10, 0) == 90deg &&
18 atan2(10, -10) == 135deg &&
19 atan2(0, -10) == 180deg &&
20 atan2(-10, -10) == -135deg &&
21 atan2(-10, 0) == -90deg &&
22 atan2(-10, 10) == -45deg &&
23 true;
24 property <bool> test: verify;
25}
26/*
27```cpp
28auto handle = TestCase::create();
29const TestCase &instance = *handle;
30assert(instance.get_verify());
31```
32
33
34```rust
35let instance = TestCase::new().unwrap();
36assert!(instance.get_verify());
37```
38
39```js
40var instance = new slint.TestCase({});
41assert(instance.verify);
42```
43*/
44