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

Function test_log

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

Source from the content-addressed store, hash-verified

1341
1342 #[test]
1343 fn test_log() {
1344 check_expr_ok(1f64.ln(), "LOG(1)");
1345 check_expr_ok(10f64.ln(), "LOG(10)");
1346
1347 check_expr_ok_with_vars(10f64.ln(), "LOG(i)", [("i", 10i32.into())]);
1348
1349 check_expr_compilation_error("1:10: LOG expected num#", "LOG()");
1350 check_expr_compilation_error("1:14: BOOLEAN is not a number", "LOG(FALSE)");
1351 check_expr_compilation_error("1:10: LOG expected num#", "LOG(3, 4)");
1352 check_expr_error("1:14: Cannot take logarithm of zero or a negative number", "LOG(0)");
1353 check_expr_error("1:14: Cannot take logarithm of zero or a negative number", "LOG(-0.1)");
1354 }
1355
1356 #[test]
1357 fn test_max() {

Callers

nothing calls this directly

Calls 4

check_expr_okFunction · 0.85
check_expr_ok_with_varsFunction · 0.85
check_expr_errorFunction · 0.85

Tested by

no test coverage detected