Extend autotest to cover all UART commands except OTA upload.
Add led_ring, find_me, restart, and ota_progress steps plus uart_cmds scenario. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user