(t *testing.T)
| 713 | } |
| 714 | |
| 715 | func TestIsEmptyAuditDiff(t *testing.T) { |
| 716 | assert.True(t, isEmptyAuditDiff(&AuditDiff{}), "Empty AuditDiff should be detected") |
| 717 | assert.True(t, isEmptyAuditDiff(&AuditDiff{ |
| 718 | FirewallDiff: &FirewallDiff{}, |
| 719 | MCPToolsDiff: &MCPToolsDiff{}, |
| 720 | }), "AuditDiff with empty sub-diffs should be detected as empty") |
| 721 | assert.False(t, isEmptyAuditDiff(&AuditDiff{ |
| 722 | MCPToolsDiff: &MCPToolsDiff{ |
| 723 | NewTools: []MCPToolDiffEntry{{ToolName: "test"}}, |
| 724 | }, |
| 725 | }), "AuditDiff with MCP changes should not be empty") |
| 726 | assert.False(t, isEmptyAuditDiff(&AuditDiff{ |
| 727 | RunMetricsDiff: &RunMetricsDiff{Run1TokenUsage: 100}, |
| 728 | }), "AuditDiff with metrics diff should not be empty") |
| 729 | } |
| 730 | |
| 731 | func TestComputeTokenUsageDiff_BothNil(t *testing.T) { |
| 732 | diff := computeTokenUsageDiff(nil, nil) |
nothing calls this directly
no test coverage detected