shithub: furgit

Download patch

ref: 246c82d09118977d45e6ccdf3a289ba0f451cd87
parent: b93ceb30454127252a921c0c8baa94f7848f7056
author: Runxi Yu <me@runxiyu.org>
date: Sun Feb 22 07:25:27 EST 2026

adler32: Use adler32_test as the test package name

--- a/internal/adler32/bench_test.go
+++ b/internal/adler32/bench_test.go
@@ -1,7 +1,9 @@
-package adler32
+package adler32_test
 
 import (
 	"testing"
+
+	"codeberg.org/lindenii/furgit/internal/adler32"
 )
 
 const benchmarkSize = 64 * 1024
@@ -16,7 +18,7 @@
 
 func BenchmarkChecksum(b *testing.B) {
 	b.ReportAllocs()
-	for range b.N {
-		Checksum(data)
+	for b.Loop() {
+		adler32.Checksum(data)
 	}
 }
--