Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuaNerin committed Oct 10, 2023
1 parent 59d62d3 commit 2b38fc5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions lsh512/test_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ func newSSE2(size int) hash.Hash { return newContextAsm(size, simdSetSSE2) }
func newSSSE3(size int) hash.Hash { return newContextAsm(size, simdSetSSSE3) }
func newAVX2(size int) hash.Hash { return newContextAsm(size, simdSetAVX2) }

func Test_ShortWrite_SSE2(t *testing.T) { HTSWA(t, as, newSSE2, true) }
func Test_ShortWrite_SSSE3(t *testing.T) { HTSWA(t, as, newSSSE3, hasSSSE3) }
func Test_ShortWrite_AVX2(t *testing.T) { HTSWA(t, as, newAVX2, hasAVX2) }
func Test_ShortWrite_SSE2(t *testing.T) { HTSWA(t, as, newSSE2, false) }
func Test_ShortWrite_SSSE3(t *testing.T) { HTSWA(t, as, newSSSE3, !hasSSSE3) }
func Test_ShortWrite_AVX2(t *testing.T) { HTSWA(t, as, newAVX2, !hasAVX2) }

func Test_WITH_GO_SSE2(t *testing.T) { HTSA(t, as, newContextGo, newSSE2, false) }
func Test_WITH_GO_SSSE3(t *testing.T) { HTSA(t, as, newContextGo, newSSE2, !hasSSSE3) }
Expand Down
3 changes: 0 additions & 3 deletions testingutil/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"encoding/hex"
"hash"
"log"
"testing"
)

Expand Down Expand Up @@ -47,8 +46,6 @@ func HT(
for _, tc := range testCases {
tc.parse()

log.Println(len(tc.MsgBytes))

h.Reset()
h.Write(tc.MsgBytes)
dst = h.Sum(dst[:0])
Expand Down
6 changes: 1 addition & 5 deletions testingutil/warning.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import (
)

func init() {
// 명령 라인 인수를 읽음
args := os.Args

// "go test" 명령을 실행하지 않았을 때 경고 메시지 출력
if len(args) < 2 || !strings.Contains(args[1], "test") {
if len(os.Args) < 2 || !strings.Contains(os.Args[1], "test") {
print("warning: testingutil package is only for go test.")
}
}

0 comments on commit 2b38fc5

Please sign in to comment.