| 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<angle> t1: acos(0); |
| 6 | property<angle> t2: acos(0.5); |
| 7 | property<angle> t3: acos(1); |
| 8 | } |
| 9 | /* |
| 10 | ```cpp |
| 11 | auto handle = TestCase::create(); |
| 12 | const TestCase &instance = *handle; |
| 13 | assert(std::abs(instance.get_t1() - 90.0) < 0.0001); |
| 14 | assert(std::abs(instance.get_t2() - 60.0) < 0.0001); |
| 15 | assert(std::abs(instance.get_t3()) < 0.0001); |
| 16 | ``` |
| 17 | |
| 18 | ```rust |
| 19 | let instance = TestCase::new().unwrap(); |
| 20 | assert!((instance.get_t1() - 90.0).abs() < 0.0001); |
| 21 | assert!((instance.get_t2() - 60.0).abs() < 0.0001); |
| 22 | assert!(instance.get_t3().abs() < 0.0001); |
| 23 | ``` |
| 24 | |
| 25 | ```js |
| 26 | var instance = new slint.TestCase({}); |
| 27 | assert.equal(instance.t1, 90); |
| 28 | assert.equal(instance.t2, 60); |
| 29 | assert.equal(instance.t3, 0); |
| 30 | ``` |
| 31 | */ |
| 32 | |