From c277fb1724c90558c69621147cff9c2eecb1d307 Mon Sep 17 00:00:00 2001 From: Dominic Della Valle Date: Tue, 15 Oct 2024 20:08:01 -0400 Subject: [PATCH] move `hash.Hash` test to hash.go --- testdata/hash.go | 8 +++++++- testdata/main.go | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testdata/hash.go b/testdata/hash.go index 8a646f2..6861994 100644 --- a/testdata/hash.go +++ b/testdata/hash.go @@ -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 diff --git a/testdata/main.go b/testdata/main.go index 0f57c43..0b6ee09 100644 --- a/testdata/main.go +++ b/testdata/main.go @@ -2,7 +2,6 @@ package main import ( "bytes" - "crypto/sha256" "fmt" "io" "math/rand" @@ -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)