|
|
@@ -108,10 +108,10 @@ func TestImpact80BacklightCatalog(t *testing.T) {
|
|
|
"starlight_dual_sat",
|
|
|
"riverflow",
|
|
|
}
|
|
|
+ if len(want) != 46 {
|
|
|
+ t.Fatalf("Backlight catalog fixture has %d entries, want 46", len(want))
|
|
|
+ }
|
|
|
for id, name := range want {
|
|
|
- if id > 45 {
|
|
|
- t.Fatalf("test catalog has %d entries", len(want))
|
|
|
- }
|
|
|
if got := EffectName(ZoneBacklight, uint8(id)); got != name {
|
|
|
t.Errorf("EffectName(%q, %d) = %q, want %q", ZoneBacklight, id, got, name)
|
|
|
}
|
|
|
@@ -303,3 +303,13 @@ func TestResolveEffectInvalidZone(t *testing.T) {
|
|
|
t.Fatal("ResolveEffect() expected error, got nil")
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+func TestParseImpact80EffectStaticAlias(t *testing.T) {
|
|
|
+ got, err := ParseImpact80Effect("static")
|
|
|
+ if err != nil {
|
|
|
+ t.Fatalf("ParseImpact80Effect(%q) unexpected error: %v", "static", err)
|
|
|
+ }
|
|
|
+ if got != 5 {
|
|
|
+ t.Errorf("ParseImpact80Effect(%q) = %d, want %d", "static", got, 5)
|
|
|
+ }
|
|
|
+}
|