aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/state_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-17 13:07:12 +0900
committerOphestra <cat@gensokyo.uk>2026-05-17 15:56:53 +0900
commit30eb0d6a613ad268f6805ccbcdcabf158e7f526f (patch)
tree07e55baa52748fd139e183017eeb43f5f64cee59 /internal/rosa/state_test.go
parentc2ff9c9fa55ea569a5e70ee90d2eb0b2ee2a0540 (diff)
internal/rosa: key metadata by string
For upcoming azalea integration. The API is quite ugly right now to ease migration. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/state_test.go')
-rw-r--r--internal/rosa/state_test.go33
1 files changed, 33 insertions, 0 deletions
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()
+ }
+}