]> Cypherpunks repositories - gostls13.git/commitdiff
all: simplify bool conditions
authorOleksandr Redko <oleksandr.red+github@gmail.com>
Wed, 6 Sep 2023 12:14:28 +0000 (15:14 +0300)
committerGopher Robot <gobot@golang.org>
Wed, 20 Sep 2023 18:06:13 +0000 (18:06 +0000)
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>
src/crypto/sha1/fallback_test.go
src/crypto/sha512/fallback_test.go
src/database/sql/sql_test.go
src/math/big/arith_s390x_test.go
src/net/http/response_test.go

index 45d1f57d39cfd352d678c07e69e3dfb9658d2f6f..aa1d413f2f063f31a72e079fbd3c094e3f3f0b76 100644 (file)
@@ -16,7 +16,7 @@ import (
 // implementation cannot be used.
 // See also TestBlockGeneric.
 func TestGenericPath(t *testing.T) {
-       if useAsm == false {
+       if !useAsm {
                t.Skipf("assembly implementation unavailable")
        }
        useAsm = false
index db5b13c38c4f080cd179dac7bb9bd183e47f9965..ac0c2c3c76f712d38637444c557669f578513f59 100644 (file)
@@ -16,7 +16,7 @@ import (
 // implementation cannot be used.
 // See also TestBlockGeneric.
 func TestGenericPath(t *testing.T) {
-       if useAsm == false {
+       if !useAsm {
                t.Skipf("assembly implementation unavailable")
        }
        useAsm = false
index f1c946d4e46929af8d0084a3ac4df909684d9bf1..c38a348ab4f88fee53bdd5cce2973522250e6f71 100644 (file)
@@ -3769,7 +3769,7 @@ func TestIssue18719(t *testing.T) {
                cancel()
 
                // Wait for the context to cancel and tx to rollback.
-               for tx.isDone() == false {
+               for !tx.isDone() {
                        time.Sleep(pollDuration)
                }
        }
index 8375ddbdd4c8c4409a5f231083816c3aefcad639..093984b397e88f3a0ed629ec01bbf872cd015fde 100644 (file)
@@ -15,7 +15,7 @@ import (
 // vector-capable machine
 
 func TestFunVVnovec(t *testing.T) {
-       if hasVX == true {
+       if hasVX {
                for _, a := range sumVV {
                        arg := a
                        testFunVV(t, "addVV_novec", addVV_novec, arg)
index ddd318084db4733b4fcb21737e825f6656c7bb3f..f3425c3c2046aca5ceeb8b949b0cfb97eb509cbf 100644 (file)
@@ -849,7 +849,7 @@ func TestReadResponseErrors(t *testing.T) {
        type testCase struct {
                name    string // optional, defaults to in
                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 {