(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestLineageGraph_TrackMemory(t *testing.T) { |
| 10 | lg := NewLineageGraph() |
| 11 | |
| 12 | metadata := &LineageMetadata{ |
| 13 | ID: "mem-1", |
| 14 | SourceIDs: []string{"session-1"}, |
| 15 | DerivedFromIDs: []string{}, |
| 16 | CreatedAt: time.Now().Unix(), |
| 17 | } |
| 18 | |
| 19 | lg.TrackMemory("mem-1", metadata) |
| 20 | |
| 21 | if lg.memoryMetadata["mem-1"] == nil { |
| 22 | t.Error("Memory metadata not tracked") |
| 23 | } |
| 24 | |
| 25 | if lg.memoryMetadata["mem-1"].ID != "mem-1" { |
| 26 | t.Errorf("Memory ID = %v, want mem-1", lg.memoryMetadata["mem-1"].ID) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func TestLineageGraph_GetDerivedMemories(t *testing.T) { |
| 31 | lg := NewLineageGraph() |
nothing calls this directly
no test coverage detected