diff --git a/bench/cec2020/benchFunctions_test.go b/bench/cec2020/benchFunctions_test.go index 2f474e5..5f1e6b8 100644 --- a/bench/cec2020/benchFunctions_test.go +++ b/bench/cec2020/benchFunctions_test.go @@ -48,3 +48,36 @@ func TestGriewank(t *testing.T) { t.Errorf("unexpected result from Griewank, want: %f, got: %v", want, got) } } + +func TestHybrid1(t *testing.T) { + in := []float64{-9.2, 10, .7, 3, -80.2843} + want := 0.00025455132345086895 + + got := Hybrid1(in) + + if got != want { + t.Errorf("unexpected result from Hybrid1, want: %f, got: %v", want, got) + } +} + +func TestHybrid2(t *testing.T) { + in := []float64{-9.2, 10, .7, 3, -80.2843} + want := 25.298615746321026 + + got := Hybrid2(in) + + if got != want { + t.Errorf("unexpected result from Hybrid2, want: %f, got: %v", want, got) + } +} + +func TestHybrid3(t *testing.T) { + in := []float64{-9.2, 10, .7, 3, -80.2843} + want := 16.298615746321026 + + got := Hybrid3(in) + + if got != want { + t.Errorf("unexpected result from Hybrid3, want: %f, got: %v", want, got) + } +}