Add led_ring, find_me, restart, and ota_progress steps plus uart_cmds scenario. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
440 B
Go
26 lines
440 B
Go
package autotest
|
|
|
|
import "testing"
|
|
|
|
func TestLedRingModeValue(t *testing.T) {
|
|
tests := []struct {
|
|
mode string
|
|
want uint32
|
|
}{
|
|
{"clear", 0},
|
|
{"progress", 1},
|
|
{"digit", 2},
|
|
{"blink", 3},
|
|
{"find-me", 4},
|
|
}
|
|
for _, tc := range tests {
|
|
got, err := ledRingModeValue(tc.mode)
|
|
if err != nil {
|
|
t.Fatalf("mode %q: %v", tc.mode, err)
|
|
}
|
|
if got != tc.want {
|
|
t.Fatalf("mode %q = %d want %d", tc.mode, got, tc.want)
|
|
}
|
|
}
|
|
}
|