Document prompt-owned schemas and finalize migration
This commit is contained in:
@@ -25,3 +25,13 @@ func TestCloneTrustedPreservesTypesAndDetaches(t *testing.T) {
|
||||
t.Fatal("nil/empty shape changed")
|
||||
}
|
||||
}
|
||||
|
||||
func TestCloneTrustedDetachesCycles(t *testing.T) {
|
||||
original := map[string]any{}
|
||||
original["self"] = original
|
||||
copy := CloneTrusted(original).(map[string]any)
|
||||
copy["self"].(map[string]any)["changed"] = true
|
||||
if copy["changed"] != true || original["changed"] != nil {
|
||||
t.Fatal("cyclic copy did not preserve its cycle independently")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user