Commit graph go-sdk/mcp/content_nil_test.go
Author SHA1 Message Date
Tim Gossett
cfa5c1d802
mcp: check that UnmarshalJSON methods for Content don't panic on nil
Introduces a new test file content_nil_test.go which verifies that UnmarshalJSON methods for various Content types do not panic when unmarshaling onto nil pointers.
Adds a nil check in contentFromWire function to guard against a nil wire.Content parameter.
Tests cover different scenarios, including valid and invalid content types, as well as cases with empty or missing content fields.

For #205
2025-08-14 14:27:25 -04:00