SDK-8: the seat set's test reads a whole seat's new optional verbs as additions
Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -103,7 +103,13 @@ func TestUseSeatsReplacesTheSetButNeverEmptiesIt(t *testing.T) {
|
||||
kept = append(kept, byName[v.Name])
|
||||
}
|
||||
g.Serves, g.Emits, g.Accepts = kept, want.Emits, want.Accepts
|
||||
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool { return n == "renames" || n == "retire" })
|
||||
// A verb the whole seat added (new, optional while its holders catch up) is no verb of the compiled list.
|
||||
g.Optional = slices.DeleteFunc(g.Optional, func(n string) bool {
|
||||
return !slices.ContainsFunc(want.Serves, func(v Verb) bool { return v.Name == n })
|
||||
})
|
||||
if len(g.Optional) == 0 {
|
||||
g.Optional = nil
|
||||
}
|
||||
want.Optional = slices.DeleteFunc(want.Optional, func(n string) bool { return dropped[want.Name+"."+n] })
|
||||
want.Serves = slices.DeleteFunc(slices.Clone(want.Serves), func(v Verb) bool { return dropped[want.Name+"."+v.Name] })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user