Files
iqudo-top1/internal/knowledge/graph_test.go
2026-08-18 16:27:02 +08:00

14 lines
487 B
Go

package knowledge
import "testing"
func TestNormalizeGraphInputSupportsMultipleDiseases(t *testing.T) {
items, relations, err := normalizeGraphInput(GraphInput{Symptoms: []SymptomInput{{Key: "poor_appetite", Name: "食欲下降", Diseases: []GraphItemInput{{Key: "gi", Name: "肠胃不适"}, {Key: "dental", Name: "口腔问题"}}}}})
if err != nil {
t.Fatal(err)
}
if len(items) != 3 || len(relations) != 2 {
t.Fatalf("items=%d relations=%d", len(items), len(relations))
}
}