docs: annotate Foundry source and deployment lifecycle in Chinese [skip ci]
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// 子图解散纯算法回归,将旧图先迁移再展开,验证数据恢复与失败输入不变。
|
||||
package platform
|
||||
|
||||
import (
|
||||
@@ -6,6 +7,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestMigrateDissolveRestoresContentAndEdges 比对节点和边的语义对象;去掉旧 frameId 后应恢复内容/几何,孩子节点和边清空。
|
||||
func TestMigrateDissolveRestoresContentAndEdges(t *testing.T) {
|
||||
raw := json.RawMessage(legacyMigrationFixture)
|
||||
parent, children, err := migrateLegacyDocument(raw, map[string]string{"f": "11111111-1111-4111-8111-111111111111", "empty": "22222222-2222-4222-8222-222222222222"})
|
||||
@@ -47,6 +49,8 @@ func TestMigrateDissolveRestoresContentAndEdges(t *testing.T) {
|
||||
t.Fatal("archived child duplicates live content")
|
||||
}
|
||||
}
|
||||
|
||||
// canvasNodesByID 将测试快照索引为节点对象,供跨文件几何和所有权断言复用。
|
||||
func canvasNodesByID(raw json.RawMessage) map[string]map[string]any {
|
||||
var doc map[string]any
|
||||
_ = json.Unmarshal(raw, &doc)
|
||||
@@ -57,6 +61,8 @@ func canvasNodesByID(raw json.RawMessage) map[string]map[string]any {
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// TestDissolveRejectsNodeCollisionWithoutMutatingInputs 将孩子节点改为父节点同名,要求所有权冲突而非覆盖,且源父 JSON 不变。
|
||||
func TestDissolveRejectsNodeCollisionWithoutMutatingInputs(t *testing.T) {
|
||||
parent, children, err := migrateLegacyDocument(json.RawMessage(legacyMigrationFixture), map[string]string{"f": "11111111-1111-4111-8111-111111111111", "empty": "22222222-2222-4222-8222-222222222222"})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user