Skip to content

Commit

Permalink
move hash.Hash test to hash.go
Browse files Browse the repository at this point in the history
  • Loading branch information
djdv committed Oct 16, 2024
1 parent 83deb0e commit c277fb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion testdata/hash.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package main

import "hash/maphash"
import (
"crypto/sha256"
"hash/maphash"
)

func ignoreHashReturns() {
sha256.New().Write([]byte{}) // EXCLUDED
}

func ignoreHashMapReturns() {
var hasher maphash.Hash
Expand Down
2 changes: 0 additions & 2 deletions testdata/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"bytes"
"crypto/sha256"
"fmt"
"io"
"math/rand"
Expand Down Expand Up @@ -147,7 +146,6 @@ func main() {
b2.Write(nil)
rand.Read(nil)
mrand.Read(nil)
sha256.New().Write([]byte{})
pr, pw := io.Pipe()
pr.CloseWithError(nil)
pw.CloseWithError(nil)
Expand Down

0 comments on commit c277fb1

Please sign in to comment.