diff --git a/Tests/finder_color.simba b/Tests/finder_color.simba index 2ac224b71..7e3175004 100644 --- a/Tests/finder_color.simba +++ b/Tests/finder_color.simba @@ -2,7 +2,7 @@ // Very simple CountColor "test" // - in case of small optimizations, or corrections this test can fail -// - I've added some tolerance of 0.1% of total pixels +// - I've added some tolerance of 1% of total pixels const TESTS := [ @@ -20,9 +20,9 @@ const 24717, 24713, 22999, - 23668, - 39849, - 53443 + 24204, + 44815, + 55037 ]; var @@ -30,14 +30,14 @@ var I: Integer; begin Bitmap := TImage.Create(500, 500); - Bitmap.DrawHSLCircle(Bitmap.Center, 200); // roughly 628300 pixels, so 0.1% error is 628 + Bitmap.DrawHSLCircle(Bitmap.Center, 200); // roughly 628300 pixels, so 0.1% error is 628 Target.SetImage(Bitmap); for I := 0 to High(TESTS) do begin WriteLn(Target.CountColor(TESTS[I]), ' vs ', TEST_RESULTS[i]); - Assert(Abs(Target.CountColor(TESTS[I]) - TEST_RESULTS[I]) < 629); + Assert(Abs(Target.CountColor(TESTS[I]) - TEST_RESULTS[I]) <= 6283); end; Bitmap.Free();