(t *testing.T)
| 1432 | } |
| 1433 | |
| 1434 | func TestDurationMult(t *testing.T) { |
| 1435 | d := int64(3600000000000) // 1 hour |
| 1436 | |
| 1437 | expr := ast.ApplyFn{symbols.DurationMult, []ast.BaseTerm{ |
| 1438 | ast.Duration(d), |
| 1439 | ast.Number(3), |
| 1440 | }} |
| 1441 | got, err := EvalApplyFn(expr, ast.ConstSubstMap{}) |
| 1442 | if err != nil { |
| 1443 | t.Fatalf("EvalApplyFn(%v) failed with %v", expr, err) |
| 1444 | } |
| 1445 | want := ast.Duration(d * 3) |
| 1446 | if !got.Equals(want) { |
| 1447 | t.Errorf("EvalApplyFn(%v) = %v, want %v", expr, got, want) |
| 1448 | } |
| 1449 | } |
| 1450 | |
| 1451 | func TestDurationComponents(t *testing.T) { |
| 1452 | // 2 hours, 30 minutes, 45 seconds = 9045 seconds total |
nothing calls this directly
no test coverage detected