@@ -94,6 +94,7 @@ function testUpdatePlotFreq(testCase)
9494 testCase .verifyEqual(testCase .controls .updatePlotFreq , 5 , ' set.updatePlotFreq method is not working' )
9595 % bad updatePlotFreq type
9696 testCase .verifyError(@() setUpdatePlotFreq(' a' ), exceptions .invalidType .errorID );
97+ testCase .verifyError(@() setUpdatePlotFreq(1.5 ), exceptions .invalidValue .errorID );
9798 testCase .verifyError(@() setUpdatePlotFreq(0 ), exceptions .invalidValue .errorID );
9899 function setUpdatePlotFreq(value )
99100 testCase.controls.updatePlotFreq = value ;
@@ -118,16 +119,18 @@ function testSimplexArguments(testCase)
118119
119120 testCase.controls.maxFuncEvals = 123 ;
120121 testCase .verifyEqual(testCase .controls .maxFuncEvals , 123 , ' set.maxFuncEvals method is not working' )
121- testCase .verifyError(@setMaxFuncEvals , exceptions .invalidType .errorID ); % bad maxFuncEvals type
122- function setMaxFuncEvals
123- testCase.controls.maxFuncEvals = ' a' ;
122+ testCase .verifyError(@() setMaxFuncEvals(' a' ), exceptions .invalidType .errorID ); % bad maxFuncEvals type
123+ testCase .verifyError(@() setMaxFuncEvals(1.5 ), exceptions .invalidValue .errorID );
124+ function setMaxFuncEvals(value )
125+ testCase.controls.maxFuncEvals = value ;
124126 end
125127
126128 testCase.controls.maxIterations = 456 ;
127129 testCase .verifyEqual(testCase .controls .maxIterations , 456 , ' set.maxIterations method is not working' )
128- testCase .verifyError(@setMaxIterations , exceptions .invalidType .errorID ); % bad maxIterations type
129- function setMaxIterations
130- testCase.controls.maxIterations = ' a' ;
130+ testCase .verifyError(@() setMaxIterations(' a' ), exceptions .invalidType .errorID ); % bad maxIterations type
131+ testCase .verifyError(@() setMaxIterations(1.5 ), exceptions .invalidValue .errorID );
132+ function setMaxIterations(value )
133+ testCase.controls.maxIterations = value ;
131134 end
132135 end
133136
@@ -138,6 +141,7 @@ function testDEArguments(testCase)
138141 % bad populationSize type
139142 testCase .verifyError(@() setPopulationSize(' a' ), exceptions .invalidType .errorID );
140143 testCase .verifyError(@() setPopulationSize(0 ), exceptions .invalidValue .errorID );
144+ testCase .verifyError(@() setPopulationSize(1.5 ), exceptions .invalidValue .errorID );
141145 function setPopulationSize(value )
142146 testCase.controls.populationSize = value ;
143147 end
@@ -186,6 +190,7 @@ function setTargetValue(value)
186190 % bad numGenerations type
187191 testCase .verifyError(@() setNumGenerations(' a' ), exceptions .invalidType .errorID );
188192 testCase .verifyError(@() setNumGenerations(0 ), exceptions .invalidValue .errorID );
193+ testCase .verifyError(@() setNumGenerations(1.5 ), exceptions .invalidValue .errorID );
189194 function setNumGenerations(value )
190195 testCase.controls.numGenerations = value ;
191196 end
@@ -198,6 +203,7 @@ function testNSArguments(testCase)
198203 % bad nLive type
199204 testCase .verifyError(@() setnLive(' a' ), exceptions .invalidType .errorID );
200205 testCase .verifyError(@() setnLive(0 ), exceptions .invalidValue .errorID );
206+ testCase .verifyError(@() setnLive(1.5 ), exceptions .invalidValue .errorID );
201207 function setnLive(value )
202208 testCase.controls.nLive = value ;
203209 end
@@ -207,6 +213,7 @@ function setnLive(value)
207213 % bad nMCMC type
208214 testCase .verifyError(@() setnMCMC(' a' ), exceptions .invalidType .errorID );
209215 testCase .verifyError(@() setnMCMC(-1 ), exceptions .invalidValue .errorID );
216+ testCase .verifyError(@() setnMCMC(1.5 ), exceptions .invalidValue .errorID );
210217 function setnMCMC(value )
211218 testCase.controls.nMCMC = value ;
212219 end
@@ -238,6 +245,7 @@ function testDreamArguments(testCase)
238245 % bad nSamples type
239246 testCase .verifyError(@() setNSamples(' a' ), exceptions .invalidType .errorID );
240247 testCase .verifyError(@() setNSamples(-1 ), exceptions .invalidValue .errorID );
248+ testCase .verifyError(@() setNSamples(1.5 ), exceptions .invalidValue .errorID );
241249 function setNSamples(value )
242250 testCase.controls.nSamples = value ;
243251 end
@@ -605,6 +613,5 @@ function testSetProcedureWithCalculate(testCase)
605613
606614 end
607615
608-
609616 end
610617end
0 commit comments