22 lines
516 B
Go
22 lines
516 B
Go
// Copyright 2022 wanderer <a_mirre at utb dot cz>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package algo
|
|
|
|
import "testing"
|
|
|
|
func TestFmtSHCOut(t *testing.T) {
|
|
want := " *** stochastic hill climbing: oh what a mountain that is!"
|
|
got := fmtSHCOut("oh what a mountain that is!")
|
|
|
|
if want != got {
|
|
t.Errorf("strings do not equal, want: %q, got: %q", want, got)
|
|
}
|
|
}
|
|
|
|
func TestPrintSHC(t *testing.T) {
|
|
if err := printSHC("whatever"); err != nil {
|
|
t.Errorf("error while printing to stderr: %q", err)
|
|
}
|
|
}
|