mirror of
https://github.com/MobAI-App/simslim.git
synced 2026-10-10 01:49:03 +02:00
* Expand simulator management and disk tooling * Add the SimSlim macOS app * Document and verify the macOS workflow
21 lines
443 B
Go
21 lines
443 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestMeasureTree(t *testing.T) {
|
|
children := map[int][]int{
|
|
10: {11, 12},
|
|
11: {13},
|
|
13: {10}, // A cycle must not double-count the root.
|
|
}
|
|
footprint := map[int]int64{10: 100, 11: 20, 12: 30, 13: 4}
|
|
|
|
got := measureTree(10, children, footprint)
|
|
if got.Processes != 4 {
|
|
t.Errorf("Processes = %d, want 4", got.Processes)
|
|
}
|
|
if got.Bytes != 154 {
|
|
t.Errorf("Bytes = %d, want 154", got.Bytes)
|
|
}
|
|
}
|