math-optim/algo/algo_test.go

36 lines
533 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) {
// TODO(me): figure out how to test this.
2022-06-14 22:34:52 +02:00
// wg.Add(1)
2022-06-14 22:34:52 +02:00
// go DoRandomSearch(&wg)
// wg.Wait()
2022-06-14 22:34:52 +02:00
}
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()")
}
}