(t *testing.T)
| 200 | } |
| 201 | |
| 202 | func TestMapExceedsLimit(t *testing.T) { |
| 203 | data := UnlimitedData{} |
| 204 | |
| 205 | t.Run("Map_ExceedsLimit", func(t *testing.T) { |
| 206 | buf := msgp.AppendMapHeader(nil, 1) |
| 207 | buf = msgp.AppendString(buf, "big_map") |
| 208 | buf = msgp.AppendMapHeader(buf, 60) // Exceeds map limit of 50 |
| 209 | |
| 210 | _, err := data.UnmarshalMsg(buf) |
| 211 | if err != msgp.ErrLimitExceeded { |
| 212 | t.Errorf("Expected ErrLimitExceeded for map, got %v", err) |
| 213 | } |
| 214 | }) |
| 215 | } |
| 216 | |
| 217 | func TestStructLevelLimits(t *testing.T) { |
| 218 | // Test that the struct-level map limits are enforced |
nothing calls this directly
no test coverage detected
searching dependent graphs…