math-optim/algo/algo_test.go

34 lines
480 B
Go
Raw Normal View History

2022-06-14 22:34:52 +02:00
// Copyright 2022 wanderer <a_mirre at utb dot cz>
// SPDX-License-Identifier: GPL-3.0-or-later
package algo
import (
"sync"
"testing"
)
var wg sync.WaitGroup
func TestDoRandomSearchExec(t *testing.T) {
wg.Add(1)
go DoRandomSearch(&wg)
wg.Wait()
}
func TestDoSHCExec(t *testing.T) {
wg.Add(1)
go DoStochasticHillClimbing(&wg)
wg.Wait()
}
2022-06-19 19:44:18 +02:00
func TestNewValues(t *testing.T) {
if v := newValues(); v == nil {
t.Error("failed to get values from newValues()")
}
}