Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
on: [push, pull_request]
name: Test
on: [push, pull_request]

permissions:
contents: read

jobs:
test:
strategy:
matrix:
go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
go-version: [1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x, 1.24.x, 1.25.x, 1.26.x]
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
GOTOOLCHAIN: local
steps:
- name: Install Go
uses: actions/setup-go@v6
Expand All @@ -16,6 +22,14 @@ jobs:
uses: actions/checkout@v6
- name: Test
run: go test -v ./...
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
- name: Test Blake3
run: go test -v ./...
working-directory: blake3
- name: Lint Blake3
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
10 changes: 8 additions & 2 deletions verifiers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@ import (

func TestDigestVerifier(t *testing.T) {
p := make([]byte, 1<<20)
rand.Read(p)
_, err := rand.Read(p)
if err != nil {
t.Fatal(err)
}
digest := FromBytes(p)

verifier := digest.Verifier()

io.Copy(verifier, bytes.NewReader(p))
_, err = io.Copy(verifier, bytes.NewReader(p))
if err != nil {
t.Fatal(err)
}

if !verifier.Verified() {
t.Fatalf("bytes not verified")
Expand Down
Loading