MCPcopy
hub / github.com/google/mangle / TestTimeFormatInvalid

Function TestTimeFormatInvalid

functional/functional_test.go:1183–1194  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1181}
1182
1183func TestTimeFormatInvalid(t *testing.T) {
1184 nanos := int64(1705314600000000000) // 2024-01-15 10:30:00 UTC
1185
1186 expr := ast.ApplyFn{symbols.TimeFormat, []ast.BaseTerm{
1187 ast.Time(nanos),
1188 name("/invalid"),
1189 }}
1190 _, err := EvalApplyFn(expr, ast.ConstSubstMap{})
1191 if err == nil {
1192 t.Fatalf("EvalApplyFn(%v) expected error, got nil", expr)
1193 }
1194}
1195
1196func TestTimeParse(t *testing.T) {
1197 tests := []struct {

Callers

nothing calls this directly

Calls 3

TimeFunction · 0.92
EvalApplyFnFunction · 0.85
nameFunction · 0.70

Tested by

no test coverage detected