aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state_test.go
blob: 8b01f7d3f9e5452c62d3ef07d4ca772994bd5fbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package rosa_test

import (
	"testing"

	"hakurei.app/internal/rosa"
)

func TestLoad(t *testing.T) {
	t.Parallel()

	for _, p := range rosa.Native().Collect() {
		t.Run(rosa.Native().MustGet(p).Name, func(t *testing.T) {
			t.Parallel()

			rosa.Native().Std().MustLoad(p)
		})
	}
}

func BenchmarkAll(b *testing.B) {
	t := rosa.Native().Clone().Std()

	for b.Loop() {
		for _, p := range t.Collect() {
			t.MustLoad(p)
		}

		b.StopTimer()
		t.DropCaches("", 0)
		b.StartTimer()
	}
}