MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_acos

Function test_acos

std/src/numerics.rs:1187–1203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 7

check_expr_okFunction · 0.85
check_expr_ok_with_varsFunction · 0.85
check_expr_errorFunction · 0.85
expect_varMethod · 0.80
checkMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected