[PATCH] tests: Adjust some primitive tests to cope with reported failure.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Tobias Hansen reported that the hl thick-50 tests where failing on an
i386 chroot on a amd64 host.  The output differs in a single pixel in an
al_draw_spline call.  I am unable to reproduce the output, so this
change adjusts the failing tests to draw the spline without a rotation
transform, hopefully to minimise floating point differences.
---
 tests/test_prim.ini |   37 +++++++++++++++++++++++--------------
 1 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/tests/test_prim.ini b/tests/test_prim.ini
index a9ddf59..2f181a3 100644
--- a/tests/test_prim.ini
+++ b/tests/test_prim.ini
@@ -62,11 +62,21 @@ op7= al_draw_rectangle(-300, -200, 300, 200, #800000ff, thickness)
 op8= al_draw_rounded_rectangle(-200, -125, 200, 125, 50, 100, #333300ff, thickness)
 op9= al_draw_ellipse(0, 0, 300, 150, #008080ff, thickness)
 op10=al_draw_arc(0, 0, 200, -1.5707, 3.1415, #803f00ff, thickness)
-op11=al_draw_spline(points, #193380ff, thickness)
+op11=
+op12=
+op13=al_draw_spline(points, #193380ff, thickness)
 points=-300,-200, 700,200, -700,200, 300,-200
 theta=0.5
 thickness=1
 
+[hl2]
+# hl2 is like hl but the spline is not rotated.
+# We received a report on i386 where the rotated spline is drawn with
+# a single pixel difference, but still acceptable.
+extend=hl
+op11=al_build_transform(trans, 320, 240, 0.75, 0.75, 0)
+op12=al_use_transform(trans)
+
 [test hl thick-0]
 extend=hl
 thickness=0
@@ -88,26 +98,25 @@ extend=hl
 thickness=10
 hash=6f8b689d
 
-[test hl thick-50]
-extend=hl
+[test hl2 thick-50]
+extend=hl2
 thickness=50
-hash=1593dcc3
+hash=70941b3e
 
-[test hl thick-50 clip]
-extend=test hl thick-50
+[test hl2 thick-50 clip]
+extend=test hl2 thick-50
 op2=al_set_clipping_rectangle(220, 140, 420, 340)
-hash=3a91d664
+hash=8509c589
 
-[test hl nolight]
-extend=test hl thick-50
+[test hl2 thick-50 nolight]
+extend=test hl2 thick-50
 op3=
-hash=01f8ddb1
+hash=85099dca
 
-[test hl nolight clip]
-extend=test hl thick-50 clip
+[test hl2 thick-50 nolight clip]
+extend=test hl2 thick-50 clip
 op3=
-thickness=50
-hash=72667163
+hash=a9cd853f
 
 [test hl fill]
 op0= al_draw_bitmap(bkg, 0, 0, 0)
-- 
1.7.4.4


--ryYtsbZYDHQrUvtZ--




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/