Skip to content

Commit

Permalink
Change format specifiers to %v. (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMarcII authored Nov 12, 2018
1 parent a1422c8 commit 95df254
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions go/webdriver/webdriver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func TestNavigateTo(t *testing.T) {
t.Fatal(err)
}
if !strings.Contains(cu.Hostname(), "google.com") {
t.Fatalf("got %s, expected to contain google.com", cu)
t.Fatalf("got %v, expected to contain google.com", cu)
}
}

Expand Down Expand Up @@ -259,7 +259,7 @@ func TestWindowHandles(t *testing.T) {
if windows, err := driver.WindowHandles(ctx); err != nil {
t.Fatal(err)
} else if len(windows) != 1 {
t.Fatalf("Got %d handles, expected 1", len(windows))
t.Fatalf("Got %v handles, expected 1", len(windows))
}
}

Expand Down Expand Up @@ -295,15 +295,15 @@ func TestExecuteScriptAsyncWithTimeout(t *testing.T) {
t.Error("Got nil err, expected timeout err")
}
if run := time.Now().Sub(start); run < time.Second || run > 5*time.Second {
t.Errorf("Got runtime %s, expected < 1 and < 5 seconds", run)
t.Errorf("Got runtime %v, expected < 1 and < 5 seconds", run)
}

start = time.Now()
if err := d.ExecuteScriptAsync(ctx, "return;", nil, nil); err == nil {
t.Error("Got nil err, expected timeout err")
}
if run := time.Now().Sub(start); run < 5*time.Second {
t.Errorf("Got runtime %s, expected > 5 seconds", run)
t.Errorf("Got runtime %v, expected > 5 seconds", run)
}
}

Expand All @@ -327,15 +327,15 @@ func TestExecuteScriptAsyncWithTimeoutWithCaps(t *testing.T) {
t.Error("Got nil err, expected timeout err")
}
if run := time.Now().Sub(start); run < time.Second || run > 5*time.Second {
t.Errorf("Got runtime %s, expected < 1 and < 5 seconds", run)
t.Errorf("Got runtime %v, expected < 1 and < 5 seconds", run)
}

start = time.Now()
if err := d.ExecuteScriptAsync(ctx, "return;", nil, nil); err == nil {
t.Error("Got nil err, expected timeout err")
}
if run := time.Now().Sub(start); run < 5*time.Second {
t.Errorf("Got runtime %s, expected > 5 seconds", run)
t.Errorf("Got runtime %v, expected > 5 seconds", run)
}
}

Expand Down

0 comments on commit 95df254

Please sign in to comment.