Skip to content

Commit 3a19da9

Browse files
committed
core/os/android/adb: Fix tests.
`bind.Simple.String()` now returns the device name if it is non-empty. The name field of the `device.Instance` is now also set.
1 parent 9b3a06a commit 3a19da9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/os/android/adb/adb_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ func mustConnect(ctx context.Context, serial string) adb.Device {
4141
func TestADBShell(t_ *testing.T) {
4242
ctx := log.Testing(t_)
4343
d := mustConnect(ctx, "production_device")
44-
assert.For(ctx, "Device").ThatString(d).Equals("production_device")
45-
assert.For(ctx, "Device shell").ThatString(d.Shell("").Target).Equals("shell:production_device")
44+
assert.For(ctx, "Device").ThatString(d).Equals("hammerhead")
45+
assert.For(ctx, "Device shell").ThatString(d.Shell("").Target).Equals("shell:hammerhead")
4646
}

core/os/android/adb/device_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func TestParseDevices(t_ *testing.T) {
3030
defer func() { devices.Handlers[0] = validDevices }()
3131
expected := &device.Instance{
3232
Serial: "production_device",
33-
Name: "",
33+
Name: "hammerhead",
3434
Configuration: &device.Configuration{
3535
OS: &device.OS{
3636
Kind: device.Android,

0 commit comments

Comments
 (0)