Move scene shape facts into the scene family

This commit is contained in:
2026-11-26 02:50:41 +00:00
parent 3e9eeee9e0
commit 6275c62d25
13 changed files with 230 additions and 63 deletions

View File

@@ -168,6 +168,22 @@ func TestCodecCandidatePreservesValidatorOwnedValues(t *testing.T) {
}
}
func TestCodecAllowsNonblankUntrimmedFields(t *testing.T) {
value := validList()
value.Scenes[0].ID = " id "
value.Scenes[0].Title = " title "
value.Scenes[0].Summary = " summary "
value.Scenes[0].SourceRef.SourceID = " source "
encoded, err := New().Encode(value)
if err != nil {
t.Fatalf("Encode() error = %v, want untrimmed nonblank values accepted", err)
}
decoded, err := New().Decode(encoded)
if err != nil || !reflect.DeepEqual(decoded, value) {
t.Fatalf("Decode() = %#v, %v", decoded, err)
}
}
func TestCodecRejectsInvalidDurableRangesWhileCandidatesPreserveThem(t *testing.T) {
codec := New()
for _, test := range []struct {