Files
ipsw/internal/diff/zz_cacheable_guard_test.go
blacktop e209828c31 feat(diff): add cacheable task-based reports
Refactor diff jobs into task-owned renderers with persistent cache support, root-confined walkers, and quieter Mach-O/Firmware output.
2026-06-04 12:02:46 -06:00

22 lines
678 B
Go

package diff
import "testing"
// TestTopLevelTasksAreCacheable documents that every top-level task implements
// CacheableTask so a fully-cached warm rerun runs ZERO top-level Parse work. A
// type assertion guards against an accidental future opt-out that would silently
// reintroduce uncached parse work on a warm rerun.
func TestTopLevelTasksAreCacheable(t *testing.T) {
for name, task := range map[string]Task{
"kexts": &kextsTask{},
"iboot": &ibootTask{},
"kdks": &kdksTask{},
"firmwares": &firmwaresTask{},
"sandbox": &sandboxTask{},
} {
if _, ok := task.(CacheableTask); !ok {
t.Errorf("%s must implement CacheableTask", name)
}
}
}