8a94ffd58f
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
14 lines
550 B
Go
14 lines
550 B
Go
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) }
|
|
}
|