MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestFormatOrderedMapValue_Basic

Function TestFormatOrderedMapValue_Basic

server/format_ordered_map_test.go:14–20  ·  view source on GitHub ↗

formatOrderedMapValue tests. Live here in package server because the function under test calls formatValue (defined in conn_results.go) which switches on the duckdb-go driver's value types — it can't move to a duckdb-free subpackage.

(t *testing.T)

Source from the content-addressed store, hash-verified

12// subpackage.
13
14func TestFormatOrderedMapValue_Basic(t *testing.T) {
15 m := arrowmap.OrderedMapValue{Keys: []any{"a"}, Values: []any{int32(1)}}
16 got := formatOrderedMapValue(m)
17 if got != "{a=1}" {
18 t.Errorf("formatOrderedMapValue = %q, want %q", got, "{a=1}")
19 }
20}
21
22func TestFormatOrderedMapValue_IntegerKeys(t *testing.T) {
23 m := arrowmap.OrderedMapValue{Keys: []any{int32(1)}, Values: []any{"one"}}

Callers

nothing calls this directly

Calls 1

formatOrderedMapValueFunction · 0.85

Tested by

no test coverage detected