MCPcopy Create free account
hub / github.com/rilldata/rill / TestStrToTime

Function TestStrToTime

runtime/pkg/mapstructureutil/mapstructureutil_test.go:10–17  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestStrToTime(t *testing.T) {
11 ts := time.Now()
12 in := map[string]any{"Val": ts.Format(time.RFC3339Nano)}
13 out := struct{ Val time.Time }{}
14 err := WeakDecode(in, &out)
15 require.NoError(t, err)
16 require.True(t, ts.Equal(out.Val))
17}
18
19func TestStrToTimePtr(t *testing.T) {
20 in := map[string]any{}

Callers

nothing calls this directly

Calls 2

WeakDecodeFunction · 0.85
FormatMethod · 0.65

Tested by

no test coverage detected