From ba049c57fb9adcf1607a09e3bedbc1962cfb64db Mon Sep 17 00:00:00 2001 From: Alexey Stukalov Date: Tue, 4 Aug 2015 16:52:59 +0300 Subject: [PATCH] fix FactCheck for probabiistic descent --- ...t_direct_search_with_probabilistic_descent.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/test_direct_search_with_probabilistic_descent.jl b/test/test_direct_search_with_probabilistic_descent.jl index de490e7b..24649372 100644 --- a/test/test_direct_search_with_probabilistic_descent.jl +++ b/test/test_direct_search_with_probabilistic_descent.jl @@ -32,7 +32,7 @@ facts("Random direction generator") do rdg2 = BlackBoxOptim.RandomDirectionGen(10, 17) ds2 = BlackBoxOptim.directions_for_k(rdg2, 1) @fact size(ds2) => (10, 17) - + end facts("Mirrored random direction generator") do @@ -40,19 +40,19 @@ facts("Mirrored random direction generator") do mrdg1 = BlackBoxOptim.MirroredRandomDirectionGen(2, 4) ds1 = BlackBoxOptim.directions_for_k(mrdg1, 1) @fact size(ds1) => (2, 4) - @fact ds1[:,3] == -ds1[:,1] => true - @fact ds1[:,4] == -ds1[:,2] => true + @fact ds1[:,3] => -ds1[:,1] + @fact ds1[:,4] => -ds1[:,2] mrdg2 = BlackBoxOptim.MirroredRandomDirectionGen(10, 6) ds2 = BlackBoxOptim.directions_for_k(mrdg2, 1) @fact size(ds2) => (10, 6) - @fact ds2[:,4] == -ds2[:,1] => true - @fact ds2[:,5] == -ds2[:,2] => true - @fact ds2[:,6] == -ds2[:,3] => true - + @fact ds2[:,4] => -ds2[:,1] + @fact ds2[:,5] => -ds2[:,2] + @fact ds2[:,6] => -ds2[:,3] + # Must be even number of directions @fact_throws BlackBoxOptim.MirroredRandomDirectionGen(10, 1) @fact_throws BlackBoxOptim.MirroredRandomDirectionGen(10, 3) @fact_throws BlackBoxOptim.MirroredRandomDirectionGen(10, 7) -end \ No newline at end of file +end