(t *testing.T)
| 158 | } |
| 159 | |
| 160 | func TestMarshalDeterministic_Pointer(t *testing.T) { |
| 161 | m := map[string]int{"b": 2, "a": 1} |
| 162 | ptr := &m |
| 163 | |
| 164 | data, err := MarshalDeterministic(ptr) |
| 165 | if err != nil { |
| 166 | t.Fatalf("MarshalDeterministic failed: %v", err) |
| 167 | } |
| 168 | |
| 169 | expected := `{"a":1,"b":2}` |
| 170 | if string(data) != expected { |
| 171 | t.Errorf("Expected %s, got %s", expected, string(data)) |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | func TestMarshalDeterministicIndent(t *testing.T) { |
| 176 | m := map[string]int{"b": 2, "a": 1} |
nothing calls this directly
no test coverage detected