(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestMarshalSorted_EmptyContainers(t *testing.T) { |
| 38 | tests := []struct { |
| 39 | name string |
| 40 | input any |
| 41 | expected string |
| 42 | }{ |
| 43 | {"empty object", map[string]any{}, "{}"}, |
| 44 | {"empty array", []any{}, "[]"}, |
| 45 | } |
| 46 | |
| 47 | for _, tt := range tests { |
| 48 | t.Run(tt.name, func(t *testing.T) { |
| 49 | result := marshalSorted(tt.input) |
| 50 | assert.Equal(t, tt.expected, result, "Should marshal empty container correctly") |
| 51 | }) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func TestMarshalSorted_SortedKeys(t *testing.T) { |
| 56 | input := map[string]any{ |
nothing calls this directly
no test coverage detected