mirror of
https://github.com/golang/go
synced 2024-11-18 19:34:41 -07:00
all: simplify bool conditions
Change-Id: Id2079f7012392dea8dfe2386bb9fb1ea3f487a4a Reviewed-on: https://go-review.googlesource.com/c/go/+/526015 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: qiulaidongfeng <2645477756@qq.com>
This commit is contained in:
parent
bebf82cbf6
commit
da8f406f06
@ -16,7 +16,7 @@ import (
|
|||||||
// implementation cannot be used.
|
// implementation cannot be used.
|
||||||
// See also TestBlockGeneric.
|
// See also TestBlockGeneric.
|
||||||
func TestGenericPath(t *testing.T) {
|
func TestGenericPath(t *testing.T) {
|
||||||
if useAsm == false {
|
if !useAsm {
|
||||||
t.Skipf("assembly implementation unavailable")
|
t.Skipf("assembly implementation unavailable")
|
||||||
}
|
}
|
||||||
useAsm = false
|
useAsm = false
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
// implementation cannot be used.
|
// implementation cannot be used.
|
||||||
// See also TestBlockGeneric.
|
// See also TestBlockGeneric.
|
||||||
func TestGenericPath(t *testing.T) {
|
func TestGenericPath(t *testing.T) {
|
||||||
if useAsm == false {
|
if !useAsm {
|
||||||
t.Skipf("assembly implementation unavailable")
|
t.Skipf("assembly implementation unavailable")
|
||||||
}
|
}
|
||||||
useAsm = false
|
useAsm = false
|
||||||
|
@ -3769,7 +3769,7 @@ func TestIssue18719(t *testing.T) {
|
|||||||
cancel()
|
cancel()
|
||||||
|
|
||||||
// Wait for the context to cancel and tx to rollback.
|
// Wait for the context to cancel and tx to rollback.
|
||||||
for tx.isDone() == false {
|
for !tx.isDone() {
|
||||||
time.Sleep(pollDuration)
|
time.Sleep(pollDuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ import (
|
|||||||
// vector-capable machine
|
// vector-capable machine
|
||||||
|
|
||||||
func TestFunVVnovec(t *testing.T) {
|
func TestFunVVnovec(t *testing.T) {
|
||||||
if hasVX == true {
|
if hasVX {
|
||||||
for _, a := range sumVV {
|
for _, a := range sumVV {
|
||||||
arg := a
|
arg := a
|
||||||
testFunVV(t, "addVV_novec", addVV_novec, arg)
|
testFunVV(t, "addVV_novec", addVV_novec, arg)
|
||||||
|
@ -849,7 +849,7 @@ func TestReadResponseErrors(t *testing.T) {
|
|||||||
type testCase struct {
|
type testCase struct {
|
||||||
name string // optional, defaults to in
|
name string // optional, defaults to in
|
||||||
in string
|
in string
|
||||||
wantErr any // nil, err value, or string substring
|
wantErr any // nil, err value, bool value, or string substring
|
||||||
}
|
}
|
||||||
|
|
||||||
status := func(s string, wantErr any) testCase {
|
status := func(s string, wantErr any) testCase {
|
||||||
|
Loading…
Reference in New Issue
Block a user