diff --git a/stats/table_test.go b/stats/table_test.go new file mode 100644 index 0000000..c89ddec --- /dev/null +++ b/stats/table_test.go @@ -0,0 +1,29 @@ +// Copyright 2022 wanderer +// SPDX-License-Identifier: GPL-3.0-or-later + +package stats + +import ( + "testing" +) + +func TestMakeTableHdr(t *testing.T) { + want := statsHdr{ + Algo: "Random Search", + BenchFuncName: "Schwefel", + Dimens: 10, + Generations: 3000, + Iterations: 30, + } + got := makeTableHdr("Random Search", "Schwefel", 10, 3000, 30) + + if want != got { + t.Errorf("wrong hdr, want: %v, got: %v", want, got) + } +} + +func TestNewStatsHdr(t *testing.T) { + if want := newStatsHdr(); want == nil { + t.Error("could not create hdr") + } +}