()
| 1185 | |
| 1186 | #[test] |
| 1187 | fn test_acos() { |
| 1188 | check_expr_ok(1f64.acos(), "ACOS(1)"); |
| 1189 | check_expr_ok(0.5f64.acos(), "ACOS(0.5)"); |
| 1190 | |
| 1191 | check_expr_ok_with_vars(0.5f64.acos(), "ACOS(d)", [("d", 0.5f64.into())]); |
| 1192 | |
| 1193 | let mut t = Tester::default(); |
| 1194 | t.run("DEG: result = ACOS(0.5)").expect_var("result", 0.5f64.acos().to_degrees()).check(); |
| 1195 | |
| 1196 | check_expr_compilation_error("1:10: ACOS expected n#", "ACOS()"); |
| 1197 | check_expr_compilation_error("1:15: BOOLEAN is not a number", "ACOS(FALSE)"); |
| 1198 | check_expr_compilation_error("1:10: ACOS expected n#", "ACOS(3, 4)"); |
| 1199 | check_expr_error( |
| 1200 | "1:15: Cannot take arc-cosine of a number outside of [-1, 1]", |
| 1201 | "ACOS(1.1)", |
| 1202 | ); |
| 1203 | } |
| 1204 | |
| 1205 | #[test] |
| 1206 | fn test_asin() { |
nothing calls this directly
no test coverage detected