panel — open-source game server manager (public release)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package sandbox
|
||||
import "testing"
|
||||
func TestSchemaShape(t *testing.T){
|
||||
s := Schema()
|
||||
if len(s) < 8 { t.Fatalf("want >=8 categories, got %d", len(s)) }
|
||||
n := 0
|
||||
for _, c := range s { n += len(c.Options); for _, o := range c.Options {
|
||||
if len(o.Values)==0 { t.Errorf("%s has no values", o.Name) }
|
||||
found:=false; for _,v:=range o.Values { if v==o.Default {found=true} }
|
||||
if !found { t.Errorf("%s default %q not in values %v", o.Name, o.Default, o.Values) }
|
||||
}}
|
||||
if n != 150 { t.Fatalf("want 150 options across categories, got %d", n) }
|
||||
}
|
||||
Reference in New Issue
Block a user