1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-23 00:32:55 +01:00

Fix stats unit test.

This commit is contained in:
Sascha L. Teichmann 2023-09-25 23:32:19 +02:00
parent b0d7dbb387
commit fca3f5bb9b

View file

@ -11,7 +11,6 @@ package main
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"log"
"log/slog" "log/slog"
"testing" "testing"
) )
@ -38,7 +37,7 @@ func TestStatsAdd(t *testing.T) {
b.signatureFailed *= 2 b.signatureFailed *= 2
b.succeeded *= 2 b.succeeded *= 2
if a != b { if a != b {
log.Fatalf("%v != %v", a, b) t.Fatalf("%v != %v", a, b)
} }
} }
@ -60,7 +59,7 @@ func TestStatsTotalFailed(t *testing.T) {
a.sha512Failed + a.sha512Failed +
a.signatureFailed a.signatureFailed
if got := a.totalFailed(); got != sum { if got := a.totalFailed(); got != sum {
log.Fatalf("got %d expected %d", got, sum) t.Fatalf("got %d expected %d", got, sum)
} }
} }