| 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 |
| 28 | auto handle = TestCase::create(); |
| 29 | const TestCase &instance = *handle; |
| 30 | assert(instance.get_verify()); |
| 31 | ``` |
| 32 | |
| 33 | |
| 34 | ```rust |
| 35 | let instance = TestCase::new().unwrap(); |
| 36 | assert!(instance.get_verify()); |
| 37 | ``` |
| 38 | |
| 39 | ```js |
| 40 | var instance = new slint.TestCase({}); |
| 41 | assert(instance.verify); |
| 42 | ``` |
| 43 | */ |
| 44 | |