mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 13:44:15 +00:00
Add tests for binary function error cases
This commit is contained in:
parent
cb0b3a1c46
commit
f396f8176e
1 changed files with 17 additions and 0 deletions
|
@ -383,3 +383,20 @@ fn test_mul_not_defined() {
|
|||
"Operation is not defined: <1 (dimensionless)> * <2018-10-03 00:00:00 +00:00>",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_log_base_with_dimension() {
|
||||
test(
|
||||
"log(10, 5m)",
|
||||
"Base must be dimensionless: log(10 (dimensionless), 5 meter (length))",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_hypot_dimension_mismatch() {
|
||||
test(
|
||||
"hypot(3s, 4m)",
|
||||
"Arguments to hypot must have matching dimensionality: \
|
||||
hypot(3 second (time), 4 meter (length))",
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue