Files
sanderling/proto/driverpb/driver_test.go
pj 4f579d2a0b feat(driver): native DoubleTap RPC for a tight inter-tap gap
Composing two Tap round trips from the Go client spread the taps by
hundreds of milliseconds on iOS, wide enough for the app to navigate
between them, so double-submission races could never reproduce. The
sidecar now lands both taps back-to-back next to the device transport.
2026-06-05 19:05:27 +05:30

49 lines
994 B
Go

package driverpb
import (
"testing"
"google.golang.org/grpc"
)
func TestDriverServiceDescriptor(t *testing.T) {
var sd grpc.ServiceDesc = Driver_ServiceDesc
if sd.ServiceName != "sanderling.driver.v1.Driver" {
t.Fatalf("unexpected service name: %q", sd.ServiceName)
}
want := map[string]bool{
"Launch": true,
"Terminate": true,
"Tap": true,
"DoubleTap": true,
"TapSelector": true,
"InputText": true,
"EraseText": true,
"Swipe": true,
"PressKey": true,
"LongPress": true,
"Screenshot": true,
"Hierarchy": true,
"Snapshot": true,
"RecentLogs": true,
"WaitForIdle": true,
"Health": true,
"Metrics": true,
}
got := map[string]bool{}
for _, m := range sd.Methods {
got[m.MethodName] = true
}
for name := range want {
if !got[name] {
t.Errorf("missing method %q in service", name)
}
}
for name := range got {
if !want[name] {
t.Errorf("unexpected method %q in service", name)
}
}
}