From 30eb0d6a613ad268f6805ccbcdcabf158e7f526f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 17 May 2026 13:07:12 +0900 Subject: internal/rosa: key metadata by string For upcoming azalea integration. The API is quite ugly right now to ease migration. Signed-off-by: Ophestra --- internal/rosa/state_test.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 internal/rosa/state_test.go (limited to 'internal/rosa/state_test.go') diff --git a/internal/rosa/state_test.go b/internal/rosa/state_test.go new file mode 100644 index 00000000..2b951a24 --- /dev/null +++ b/internal/rosa/state_test.go @@ -0,0 +1,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().Load(rosa.Std, p) + }) + } +} + +func BenchmarkAll(b *testing.B) { + s := rosa.Native().Clone() + + for b.Loop() { + for _, p := range s.Collect() { + s.Load(rosa.Std, p) + } + + b.StopTimer() + s.DropCaches("", 0) + b.StartTimer() + } +} -- cgit v1.3.1