Wait for MVC update and break loops. 45/7845/3
Cedric Delamarre [Tue, 10 Jul 2012 15:07:24 +0000 (17:07 +0200)]
Change-Id: I4261112c18fff7e7d955466b6326e225ee2b49a0

scilab/modules/graphics/tests/nonreg_tests/bug_3404.dia.ref
scilab/modules/graphics/tests/nonreg_tests/bug_3404.tst

index 658be30..0b51246 100644 (file)
@@ -18,14 +18,10 @@ a = gca();
 a.data_bounds = [1e-9,-20;10,10];
 a.axes_visible = "on";
 a.log_flags = "lnn";
-for i=-9:1
- expectedLocations(i + 10) = 10^(i);
-end
+expectedLocations = 10^(-10:2)';
+sleep(200)//Wait for MVC update
 // compare the expected locations and the real ones
-for i=1:11,
-  if  abs(  (expectedLocations(i) - a.x_ticks.locations(i)) ..
-           / max(expectedLocations(i), a.x_ticks.locations(i))) > 1000 * %eps then bugmes();quit;end
-end
+assert_checkalmostequal(expectedLocations, a.x_ticks.locations);
 // now draw a segs object using this scale
 xarrows([0.0001,0.01],[-15,1],5,1);
 // check that the arrow is centered
index 32c2241..331c1a5 100644 (file)
 //
 // <-- Short Description -->
 // Some problems come when an axis is set in log scale.
-// 
+//
 
 // first check axes
 a = gca();
 a.data_bounds = [1e-9,-20;10,10];
 a.axes_visible = "on";
 a.log_flags = "lnn";
-for i=-9:1
- expectedLocations(i + 10) = 10^(i);
-end
 
-// compare the expected locations and the real ones
-for i=1:11,
-  if  abs(  (expectedLocations(i) - a.x_ticks.locations(i)) ..
-           / max(expectedLocations(i), a.x_ticks.locations(i))) > 1000 * %eps then pause; end
-end
+expectedLocations = 10^(-10:2)';
+sleep(200)//Wait for MVC update
 
+// compare the expected locations and the real ones
+assert_checkalmostequal(expectedLocations, a.x_ticks.locations);
 
 // now draw a segs object using this scale
 xarrows([0.0001,0.01],[-15,1],5,1);