diff options
Diffstat (limited to 'test')
69 files changed, 822 insertions, 366 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index ec2d028..805ac16 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,128 +1,130 @@ SUBDIRS=pdiff . # Here are all the tests that are run unconditionally -TESTS = \ -a8-mask \ -big-trap \ -caps-joins \ -caps-joins-alpha \ -caps-sub-paths \ -clip-all \ -clip-empty \ -clip-fill-rule \ -clip-fill-rule-pixel-aligned \ -clip-nesting \ -clip-operator \ -clip-push-group \ -clip-twice \ -clip-zero \ -close-path \ -composite-integer-translate-source \ -composite-integer-translate-over \ -composite-integer-translate-over-repeat \ -copy-path \ -create-for-stream \ -create-from-png \ -create-from-png-stream \ -dash-caps-joins \ -dash-no-dash \ -dash-offset-negative \ -dash-scale \ -dash-zero-length \ -dash-state \ -degenerate-path \ -degenerate-pen \ -device-offset \ -device-offset-positive \ -extend-pad \ -fill-and-stroke \ -fill-and-stroke-alpha \ -fill-and-stroke-alpha-add \ -fill-degenerate-sort-order \ -fill-missed-stop \ -fill-rule \ -filter-nearest-offset \ -font-face-get-type \ -font-matrix-translation \ -glyph-cache-pressure \ -get-and-set \ -get-clip \ -get-group-target \ -get-path-extents \ -gradient-alpha \ -infinite-join \ -in-fill-empty-trapezoid \ -invalid-matrix \ -leaky-dash \ -leaky-polygon \ -line-width \ -line-width-scale \ -line-width-zero \ -linear-gradient \ -linear-gradient-reflect \ -long-lines \ -mask \ -mask-alpha \ -mask-ctm \ -mask-surface-ctm \ -meta-surface-pattern \ -move-to-show-surface \ -new-sub-path \ -nil-surface \ -operator-clear \ -operator-source \ -over-above-source \ -over-around-source \ -over-below-source \ -over-between-source \ -paint \ -paint-repeat \ -paint-source-alpha \ -paint-with-alpha \ -pattern-get-type \ -pattern-getters \ -pixman-rotate \ -radial-gradient \ -random-intersections \ -rectangle-rounding-error \ -rectilinear-stroke \ -rgb24-ignore-alpha \ -rotate-image-surface-paint \ -scale-down-source-surface-paint \ -scale-source-surface-paint \ -select-font-face \ -select-font-no-show-text \ -self-copy \ -self-intersecting \ -set-source \ -show-text-current-point \ -skew-extreme \ -solid-pattern-cache-stress \ -source-clip \ -source-clip-scale \ -source-surface-scale-paint \ -surface-finish-twice \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up \ -text-antialias-gray \ -text-antialias-none \ -text-antialias-subpixel \ -text-cache-crash \ -text-pattern \ -text-rotate \ -text-zero-len \ -transforms \ -translate-show-surface \ -trap-clip \ -truetype-tables \ -unantialiased-shapes \ -unbounded-operator \ -user-data \ -rel-path \ -push-group \ -zero-alpha +TESTS = \ +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +caps-joins$(EXEEXT) \ +caps-joins-alpha$(EXEEXT) \ +caps-sub-paths$(EXEEXT) \ +clip-all$(EXEEXT) \ +clip-empty$(EXEEXT) \ +clip-fill-rule$(EXEEXT) \ +clip-fill-rule-pixel-aligned$(EXEEXT) \ +clip-nesting$(EXEEXT) \ +clip-operator$(EXEEXT) \ +clip-push-group$(EXEEXT) \ +clip-twice$(EXEEXT) \ +clip-zero$(EXEEXT) \ +close-path$(EXEEXT) \ +composite-integer-translate-source$(EXEEXT) \ +composite-integer-translate-over$(EXEEXT) \ +composite-integer-translate-over-repeat$(EXEEXT) \ +copy-path$(EXEEXT) \ +create-for-stream$(EXEEXT) \ +create-from-png$(EXEEXT) \ +create-from-png-stream$(EXEEXT) \ +dash-caps-joins$(EXEEXT) \ +dash-no-dash$(EXEEXT) \ +dash-offset-negative$(EXEEXT) \ +dash-scale$(EXEEXT) \ +dash-state$(EXEEXT) \ +dash-zero-length$(EXEEXT) \ +degenerate-path$(EXEEXT) \ +degenerate-pen$(EXEEXT) \ +device-offset$(EXEEXT) \ +device-offset-positive$(EXEEXT) \ +extend-pad$(EXEEXT) \ +fill-and-stroke$(EXEEXT) \ +fill-and-stroke-alpha$(EXEEXT) \ +fill-and-stroke-alpha-add$(EXEEXT) \ +fill-degenerate-sort-order$(EXEEXT) \ +fill-missed-stop$(EXEEXT) \ +fill-rule$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +font-face-get-type$(EXEEXT) \ +font-matrix-translation$(EXEEXT) \ +glyph-cache-pressure$(EXEEXT) \ +get-and-set$(EXEEXT) \ +get-clip$(EXEEXT) \ +get-group-target$(EXEEXT) \ +get-path-extents$(EXEEXT) \ +gradient-alpha$(EXEEXT) \ +gradient-zero-stops$(EXEEXT) \ +infinite-join$(EXEEXT) \ +in-fill-empty-trapezoid$(EXEEXT) \ +invalid-matrix$(EXEEXT) \ +leaky-dash$(EXEEXT) \ +leaky-polygon$(EXEEXT) \ +line-width$(EXEEXT) \ +line-width-scale$(EXEEXT) \ +line-width-zero$(EXEEXT) \ +linear-gradient$(EXEEXT) \ +linear-gradient-reflect$(EXEEXT) \ +long-lines$(EXEEXT) \ +mask$(EXEEXT) \ +mask-alpha$(EXEEXT) \ +mask-ctm$(EXEEXT) \ +mask-surface-ctm$(EXEEXT) \ +meta-surface-pattern$(EXEEXT) \ +miter-precision$(EXEEXT) \ +move-to-show-surface$(EXEEXT) \ +new-sub-path$(EXEEXT) \ +nil-surface$(EXEEXT) \ +operator-clear$(EXEEXT) \ +operator-source$(EXEEXT) \ +over-above-source$(EXEEXT) \ +over-around-source$(EXEEXT) \ +over-below-source$(EXEEXT) \ +over-between-source$(EXEEXT) \ +paint$(EXEEXT) \ +paint-repeat$(EXEEXT) \ +paint-source-alpha$(EXEEXT) \ +paint-with-alpha$(EXEEXT) \ +pattern-get-type$(EXEEXT) \ +pattern-getters$(EXEEXT) \ +pixman-rotate$(EXEEXT) \ +push-group$(EXEEXT) \ +radial-gradient$(EXEEXT) \ +random-intersections$(EXEEXT) \ +rectangle-rounding-error$(EXEEXT) \ +rectilinear-stroke$(EXEEXT) \ +rel-path$(EXEEXT) \ +rgb24-ignore-alpha$(EXEEXT) \ +rotate-image-surface-paint$(EXEEXT) \ +scale-down-source-surface-paint$(EXEEXT) \ +scale-source-surface-paint$(EXEEXT) \ +select-font-face$(EXEEXT) \ +select-font-no-show-text$(EXEEXT) \ +self-copy$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +set-source$(EXEEXT) \ +show-text-current-point$(EXEEXT) \ +skew-extreme$(EXEEXT) \ +solid-pattern-cache-stress$(EXEEXT) \ +source-clip$(EXEEXT) \ +source-clip-scale$(EXEEXT) \ +source-surface-scale-paint$(EXEEXT) \ +surface-finish-twice$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) \ +text-antialias-gray$(EXEEXT) \ +text-antialias-none$(EXEEXT) \ +text-antialias-subpixel$(EXEEXT) \ +text-cache-crash$(EXEEXT) \ +text-pattern$(EXEEXT) \ +text-rotate$(EXEEXT) \ +text-zero-len$(EXEEXT) \ +transforms$(EXEEXT) \ +translate-show-surface$(EXEEXT) \ +trap-clip$(EXEEXT) \ +truetype-tables$(EXEEXT) \ +unantialiased-shapes$(EXEEXT) \ +unbounded-operator$(EXEEXT) \ +user-data$(EXEEXT) \ +zero-alpha$(EXEEXT) # XXX: Here are some existing tests that are currently disabled for # one reason or another. They can still be built and run (manually) @@ -164,49 +166,50 @@ zero-alpha # suite, (in spite of the XFAIL status of the test). So maybe # that's just a bug in the test rig that should just consider # the abort an XFAIL like any other. -DISABLED_TESTS = \ -extend-reflect \ -show-glyphs-many \ -text-glyph-range +DISABLED_TESTS = \ +extend-reflect$(EXEEXT) \ +show-glyphs-many$(EXEEXT) \ +text-glyph-range$(EXEEXT) # Then we have a collection of tests that are only run if certain # features are compiled into cairo if HAVE_PTHREAD -TESTS += pthread-show-text +TESTS += pthread-show-text$(EXEEXT) endif if CAIRO_HAS_FT_FONT -TESTS += bitmap-font -TESTS += ft-font-create-for-ft-face -TESTS += ft-text-vertical-layout-type1 -TESTS += ft-text-vertical-layout-type3 -TESTS += ft-text-antialias-none +TESTS += bitmap-font$(EXEEXT) +TESTS += ft-font-create-for-ft-face$(EXEEXT) +TESTS += ft-text-vertical-layout-type1$(EXEEXT) +TESTS += ft-text-vertical-layout-type3$(EXEEXT) +TESTS += ft-text-antialias-none$(EXEEXT) endif if CAIRO_HAS_SVG_SURFACE -TESTS += svg-surface svg-clip +TESTS += svg-surface$(EXEEXT) +TESTS += svg-clip$(EXEEXT) endif if CAIRO_HAS_PDF_SURFACE -TESTS += pdf-features +TESTS += pdf-features$(EXEEXT) endif if CAIRO_HAS_PS_SURFACE -TESTS += ps-features +TESTS += ps-features$(EXEEXT) endif if CAIRO_HAS_XLIB_SURFACE -TESTS += xlib-surface +TESTS += xlib-surface$(EXEEXT) endif if CAIRO_HAS_MULTI_PAGE_SURFACES -TESTS += multi-page +TESTS += multi-page$(EXEEXT) endif if CAIRO_HAS_SVG_SURFACE if CAIRO_HAS_PDF_SURFACE if CAIRO_HAS_PS_SURFACE -TESTS += fallback-resolution +TESTS += fallback-resolution$(EXEEXT) endif endif endif @@ -227,18 +230,24 @@ REFERENCE_IMAGES = \ clip-fill-rule-pixel-aligned-ref.png \ clip-fill-rule-pixel-aligned-rgb24-ref.png \ clip-fill-rule-ps-argb32-ref.png \ + clip-fill-rule-ps-rgb24-ref.png \ clip-fill-rule-ref.png \ clip-fill-rule-rgb24-ref.png \ clip-nesting-ps-argb32-ref.png \ + clip-nesting-ps-rgb24-ref.png \ clip-nesting-quartz-ref.png \ clip-nesting-quartz-rgb24-ref.png \ clip-nesting-ref.png \ clip-nesting-rgb24-ref.png \ clip-operator-ref.png \ + clip-operator-ps-argb32-ref.png \ clip-operator-rgb24-ref.png \ + clip-push-group-ps-argb32-ref.png \ + clip-push-group-ps-rgb24-ref.png \ clip-push-group-quartz-ref.png \ clip-push-group-ref.png \ clip-twice-ps-argb32-ref.png \ + clip-twice-ps-rgb24-ref.png \ clip-twice-quartz-ref.png \ clip-twice-quartz-rgb24-ref.png \ clip-twice-ref.png \ @@ -248,17 +257,21 @@ REFERENCE_IMAGES = \ composite-integer-translate-over-repeat-ref.png \ composite-integer-translate-source-ref.png \ copy-path-ps-argb32-ref.png \ + copy-path-ps-rgb24-ref.png \ copy-path-ref.png \ create-from-png-ref.png \ create-from-png-stream-ref.png \ dash-caps-joins-ps-argb32-ref.png \ + dash-caps-joins-ps-rgb24-ref.png \ dash-caps-joins-quartz-ref.png \ dash-caps-joins-ref.png \ dash-no-dash-ref.png \ dash-offset-negative-ref.png \ dash-scale-ps-argb32-ref.png \ + dash-scale-ps-rgb24-ref.png \ dash-scale-ref.png \ dash-state-ps-argb32-ref.png \ + dash-state-ps-rgb24-ref.png \ dash-state-ref.png \ dash-zero-length-ps-argb32-ref.png \ dash-zero-length-ref.png \ @@ -266,6 +279,7 @@ REFERENCE_IMAGES = \ degenerate-pen-ref.png \ degenerate-pen-ps-argb32-ref.png \ degenerate-path-ps-argb32-ref.png \ + degenerate-path-ps-rgb24-ref.png \ degenerate-path-ref.png \ degenerate-path-rgb24-ref.png \ device-offset-positive-ref.png \ @@ -279,6 +293,7 @@ REFERENCE_IMAGES = \ fill-and-stroke-alpha-quartz-ref.png \ fill-and-stroke-alpha-ref.png \ fill-and-stroke-ps-argb32-ref.png \ + fill-and-stroke-ps-rgb24-ref.png \ fill-and-stroke-quartz-ref.png \ fill-and-stroke-quartz-rgb24-ref.png \ fill-and-stroke-ref.png \ @@ -288,6 +303,7 @@ REFERENCE_IMAGES = \ fill-degenerate-sort-order-ref.png \ fill-degenerate-sort-order-rgb24-ref.png \ fill-missed-stop-ps-argb32-ref.png \ + fill-missed-stop-ps-rgb24-ref.png \ fill-missed-stop-ref.png \ fill-missed-stop-rgb24-ref.png \ fill-rule-ps-argb32-ref.png \ @@ -297,6 +313,7 @@ REFERENCE_IMAGES = \ fill-rule-rgb24-ref.png \ filter-nearest-offset-ref.png \ font-matrix-translation-ps-argb32-ref.png \ + font-matrix-translation-ps-rgb24-ref.png \ font-matrix-translation-ref.png \ font-matrix-translation-svg-ref.png \ ft-text-antialias-none-ps-argb32-ref.png \ @@ -309,17 +326,25 @@ REFERENCE_IMAGES = \ ft-text-vertical-layout-type3-svg-ref.png \ get-group-target-ref.png \ glyph-cache-pressure-ref.png \ + gradient-alpha-ps-argb32-ref.png \ + gradient-alpha-ps-rgb24-ref.png \ gradient-alpha-ref.png \ gradient-alpha-rgb24-ref.png \ + gradient-zero-stops-ref.png \ + gradient-zero-stops-rgb24-ref.png \ infinite-join-ref.png \ leaky-dash-ps-argb32-ref.png \ + leaky-dash-ps-rgb24-ref.png \ leaky-dash-ref.png \ leaky-polygon-ref.png \ linear-gradient-reflect-ref.png \ + linear-gradient-ps-argb32-ref.png \ + linear-gradient-ps-rgb24-ref.png \ linear-gradient-ref.png \ linear-gradient-svg-ref.png \ line-width-ref.png \ line-width-scale-ps-argb32-ref.png \ + line-width-scale-ps-rgb24-ref.png \ line-width-scale-ref.png \ long-lines-ref.png \ mask-alpha-ref.png \ @@ -336,8 +361,10 @@ REFERENCE_IMAGES = \ mask-svg-argb32-ref.png \ meta-surface-pattern-ref.png \ meta-surface-pattern-rgb24-ref.png \ + miter-precision-ref.png \ move-to-show-surface-ref.png \ new-sub-path-ps-argb32-ref.png \ + new-sub-path-ps-rgb24-ref.png \ new-sub-path-quartz-ref.png \ new-sub-path-quartz-rgb24-ref.png \ new-sub-path-ref.png \ @@ -348,6 +375,8 @@ REFERENCE_IMAGES = \ operator-clear-quartz-rgb24-ref.png \ operator-clear-ref.png \ operator-clear-rgb24-ref.png \ + operator-source-ps-argb32-ref.png \ + operator-source-ps-rgb24-ref.png \ operator-source-ref.png \ operator-source-rgb24-ref.png \ over-above-source-ps-argb32-ref.png \ @@ -370,6 +399,8 @@ REFERENCE_IMAGES = \ paint-with-alpha-ref.png \ paint-with-alpha-svg-ref.png \ pattern-getters-ref.png \ + pixman-rotate-ps-argb32-ref.png \ + pixman-rotate-ps-rgb24-ref.png \ pixman-rotate-ref.png \ pixman-rotate-rgb24-ref.png \ push-group-ref.png \ @@ -378,16 +409,19 @@ REFERENCE_IMAGES = \ radial-gradient-ref.png \ radial-gradient-svg-ref.png \ random-intersections-ps-argb32-ref.png \ + random-intersections-ps-rgb24-ref.png \ random-intersections-ref.png \ rgb24-ignore-alpha-ref.png \ rectangle-rounding-error-ref.png \ rectilinear-stroke-ref.png \ rel-path-quartz-ref.png \ rel-path-quartz-rgb24-ref.png \ + rel-path-ps-rgb24-ref.png \ rel-path-ref.png \ rel-path-rgb24-ref.png \ rotate-image-surface-paint-pdf-argb32-ref.png \ rotate-image-surface-paint-ps-argb32-ref.png \ + rotate-image-surface-paint-ps-rgb24-ref.png \ rotate-image-surface-paint-ref.png \ rotate-image-surface-paint-svg-ref.png \ scale-down-source-surface-paint-ref.png \ @@ -408,10 +442,13 @@ REFERENCE_IMAGES = \ skew-extreme-ref.png \ source-clip-ref.png \ source-clip-scale-quartz-ref.png \ + source-clip-scale-ps-argb32-ref.png \ + source-clip-scale-ps-rgb24-ref.png \ source-clip-scale-ref.png \ source-clip-scale-svg-ref.png \ source-surface-scale-paint-ref.png \ source-surface-scale-paint-rgb24-ref.png \ + surface-pattern-big-scale-down-ref.png \ surface-pattern-pdf-argb32-ref.png \ surface-pattern-ps-argb32-ref.png \ surface-pattern-ref.png \ @@ -427,11 +464,14 @@ REFERENCE_IMAGES = \ text-antialias-subpixel-ref.png \ text-glyph-range-ref.png \ text-glyph-range-rgb24-ref.png \ + text-pattern-ps-argb32-ref.png \ + text-pattern-ps-rgb24-ref.png \ text-pattern-ref.png \ text-pattern-rgb24-ref.png \ text-pattern-svg-argb32-ref.png \ text-pattern-svg-rgb24-ref.png \ text-rotate-ps-argb32-ref.png \ + text-rotate-ps-rgb24-ref.png \ text-rotate-ref.png \ text-rotate-svg-ref.png \ text-zero-len-ref.png \ @@ -440,6 +480,7 @@ REFERENCE_IMAGES = \ trap-clip-quartz-ref.png \ trap-clip-quartz-rgb24-ref.png \ trap-clip-ps-argb32-ref.png \ + trap-clip-ps-rgb24-ref.png \ trap-clip-ref.png \ trap-clip-rgb24-ref.png \ unantialiased-shapes-ref.png \ @@ -466,21 +507,20 @@ $(REFERENCE_IMAGES) # # Also, any test listed here should call cairo_test_expect_failure and # provide an explanation for the expected failure. -XFAIL_TESTS = \ -a8-mask \ -big-trap \ -extend-pad \ -filter-nearest-offset \ -long-lines \ -self-intersecting \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up +XFAIL_TESTS = \ +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +extend-pad$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +long-lines$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) # Any test that doesn't generate a log file goes here NOLOG_TESTS = \ -create-for-stream \ user-data \ svg-surface \ svg-clip \ @@ -489,6 +529,24 @@ ps-features \ multi-page \ fallback-resolution +# A hook that summarises the failures +check: AM_MAKEFLAGS+=-k +check-local: + @FAILED_TESTS=""; \ + for t in *.log; do \ + if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \ + FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \ + fi; \ + done; \ + if test -n "$$FAILED_TESTS"; then \ + echo "Failed tests:"; \ + for t in $$FAILED_TESTS; do \ + echo -n " $$t: "; \ + grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \ + echo; \ + done; \ + fi + check_PROGRAMS = EXTRA_PROGRAMS = @@ -558,7 +616,7 @@ EXTRA_PROGRAMS += $(TESTS) $(DISABLED_TESTS) TARGETS = $(CAIRO_TEST_TARGET) TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE) -TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" +TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS:$(EXEEXT)=)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_FLAGS = \ @@ -590,8 +648,8 @@ check-valgrind: $(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log # The following definitions both should work. -#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` -FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` +#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` +FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` recheck = check TESTS="$(FAILED_TESTS)" @@ -616,7 +674,7 @@ retest: # Make index.html with no dependency tracking. html: @echo Creating index.html - @perl $(srcdir)/make-html.pl $(TESTS:=.log) > index.html + @perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html # Make index.html with no dependency tracking, containing only the failed tests. rehtml: @@ -630,7 +688,7 @@ NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log) $(NOLOG_TESTS_LOG): echo dummy > $@ -index.html: $(srcdir)/make-html.pl $(TESTS:=.log) +index.html: $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) @echo Creating index.html @perl $^ > $@ diff --git a/test/Makefile.in b/test/Makefile.in index 2255381..8deb773 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -38,18 +38,19 @@ host_triplet = @host@ # Then we have a collection of tests that are only run if certain # features are compiled into cairo -@HAVE_PTHREAD_TRUE@am__append_1 = pthread-show-text -@CAIRO_HAS_FT_FONT_TRUE@am__append_2 = bitmap-font \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-font-create-for-ft-face \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type1 \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type3 \ -@CAIRO_HAS_FT_FONT_TRUE@ ft-text-antialias-none -@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_3 = svg-surface svg-clip -@CAIRO_HAS_PDF_SURFACE_TRUE@am__append_4 = pdf-features -@CAIRO_HAS_PS_SURFACE_TRUE@am__append_5 = ps-features -@CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_6 = xlib-surface -@CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE@am__append_7 = multi-page -@CAIRO_HAS_PDF_SURFACE_TRUE@@CAIRO_HAS_PS_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_8 = fallback-resolution +@HAVE_PTHREAD_TRUE@am__append_1 = pthread-show-text$(EXEEXT) +@CAIRO_HAS_FT_FONT_TRUE@am__append_2 = bitmap-font$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-font-create-for-ft-face$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type1$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-vertical-layout-type3$(EXEEXT) \ +@CAIRO_HAS_FT_FONT_TRUE@ ft-text-antialias-none$(EXEEXT) +@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_3 = svg-surface$(EXEEXT) \ +@CAIRO_HAS_SVG_SURFACE_TRUE@ svg-clip$(EXEEXT) +@CAIRO_HAS_PDF_SURFACE_TRUE@am__append_4 = pdf-features$(EXEEXT) +@CAIRO_HAS_PS_SURFACE_TRUE@am__append_5 = ps-features$(EXEEXT) +@CAIRO_HAS_XLIB_SURFACE_TRUE@am__append_6 = xlib-surface$(EXEEXT) +@CAIRO_HAS_MULTI_PAGE_SURFACES_TRUE@am__append_7 = multi-page$(EXEEXT) +@CAIRO_HAS_PDF_SURFACE_TRUE@@CAIRO_HAS_PS_SURFACE_TRUE@@CAIRO_HAS_SVG_SURFACE_TRUE@am__append_8 = fallback-resolution$(EXEEXT) check_PROGRAMS = imagediff$(EXEEXT) png-flatten$(EXEEXT) \ $(am__EXEEXT_11) $(am__EXEEXT_12) EXTRA_PROGRAMS = $(am__EXEEXT_9) $(am__EXEEXT_10) @@ -99,7 +100,7 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ create-from-png$(EXEEXT) create-from-png-stream$(EXEEXT) \ dash-caps-joins$(EXEEXT) dash-no-dash$(EXEEXT) \ dash-offset-negative$(EXEEXT) dash-scale$(EXEEXT) \ - dash-zero-length$(EXEEXT) dash-state$(EXEEXT) \ + dash-state$(EXEEXT) dash-zero-length$(EXEEXT) \ degenerate-path$(EXEEXT) degenerate-pen$(EXEEXT) \ device-offset$(EXEEXT) device-offset-positive$(EXEEXT) \ extend-pad$(EXEEXT) fill-and-stroke$(EXEEXT) \ @@ -111,25 +112,26 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ glyph-cache-pressure$(EXEEXT) get-and-set$(EXEEXT) \ get-clip$(EXEEXT) get-group-target$(EXEEXT) \ get-path-extents$(EXEEXT) gradient-alpha$(EXEEXT) \ - infinite-join$(EXEEXT) in-fill-empty-trapezoid$(EXEEXT) \ - invalid-matrix$(EXEEXT) leaky-dash$(EXEEXT) \ - leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ + gradient-zero-stops$(EXEEXT) infinite-join$(EXEEXT) \ + in-fill-empty-trapezoid$(EXEEXT) invalid-matrix$(EXEEXT) \ + leaky-dash$(EXEEXT) leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ line-width-scale$(EXEEXT) line-width-zero$(EXEEXT) \ linear-gradient$(EXEEXT) linear-gradient-reflect$(EXEEXT) \ long-lines$(EXEEXT) mask$(EXEEXT) mask-alpha$(EXEEXT) \ mask-ctm$(EXEEXT) mask-surface-ctm$(EXEEXT) \ - meta-surface-pattern$(EXEEXT) move-to-show-surface$(EXEEXT) \ - new-sub-path$(EXEEXT) nil-surface$(EXEEXT) \ - operator-clear$(EXEEXT) operator-source$(EXEEXT) \ - over-above-source$(EXEEXT) over-around-source$(EXEEXT) \ - over-below-source$(EXEEXT) over-between-source$(EXEEXT) \ - paint$(EXEEXT) paint-repeat$(EXEEXT) \ - paint-source-alpha$(EXEEXT) paint-with-alpha$(EXEEXT) \ - pattern-get-type$(EXEEXT) pattern-getters$(EXEEXT) \ - pixman-rotate$(EXEEXT) radial-gradient$(EXEEXT) \ + meta-surface-pattern$(EXEEXT) miter-precision$(EXEEXT) \ + move-to-show-surface$(EXEEXT) new-sub-path$(EXEEXT) \ + nil-surface$(EXEEXT) operator-clear$(EXEEXT) \ + operator-source$(EXEEXT) over-above-source$(EXEEXT) \ + over-around-source$(EXEEXT) over-below-source$(EXEEXT) \ + over-between-source$(EXEEXT) paint$(EXEEXT) \ + paint-repeat$(EXEEXT) paint-source-alpha$(EXEEXT) \ + paint-with-alpha$(EXEEXT) pattern-get-type$(EXEEXT) \ + pattern-getters$(EXEEXT) pixman-rotate$(EXEEXT) \ + push-group$(EXEEXT) radial-gradient$(EXEEXT) \ random-intersections$(EXEEXT) \ rectangle-rounding-error$(EXEEXT) rectilinear-stroke$(EXEEXT) \ - rgb24-ignore-alpha$(EXEEXT) \ + rel-path$(EXEEXT) rgb24-ignore-alpha$(EXEEXT) \ rotate-image-surface-paint$(EXEEXT) \ scale-down-source-surface-paint$(EXEEXT) \ scale-source-surface-paint$(EXEEXT) select-font-face$(EXEEXT) \ @@ -148,10 +150,10 @@ am__EXEEXT_9 = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ transforms$(EXEEXT) translate-show-surface$(EXEEXT) \ trap-clip$(EXEEXT) truetype-tables$(EXEEXT) \ unantialiased-shapes$(EXEEXT) unbounded-operator$(EXEEXT) \ - user-data$(EXEEXT) rel-path$(EXEEXT) push-group$(EXEEXT) \ - zero-alpha$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2) \ - $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5) \ - $(am__EXEEXT_6) $(am__EXEEXT_7) $(am__EXEEXT_8) + user-data$(EXEEXT) zero-alpha$(EXEEXT) $(am__EXEEXT_1) \ + $(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \ + $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \ + $(am__EXEEXT_8) am__EXEEXT_10 = extend-reflect$(EXEEXT) show-glyphs-many$(EXEEXT) \ text-glyph-range$(EXEEXT) @CAIRO_CAN_TEST_PDF_SURFACE_TRUE@am__EXEEXT_11 = pdf2png$(EXEEXT) @@ -445,6 +447,11 @@ gradient_alpha_OBJECTS = gradient-alpha.$(OBJEXT) gradient_alpha_LDADD = $(LDADD) gradient_alpha_DEPENDENCIES = $(am__DEPENDENCIES_1) libcairotest.la \ $(am__DEPENDENCIES_1) +gradient_zero_stops_SOURCES = gradient-zero-stops.c +gradient_zero_stops_OBJECTS = gradient-zero-stops.$(OBJEXT) +gradient_zero_stops_LDADD = $(LDADD) +gradient_zero_stops_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + libcairotest.la $(am__DEPENDENCIES_1) imagediff_SOURCES = imagediff.c imagediff_OBJECTS = imagediff.$(OBJEXT) imagediff_LDADD = $(LDADD) @@ -530,6 +537,11 @@ meta_surface_pattern_OBJECTS = meta-surface-pattern.$(OBJEXT) meta_surface_pattern_LDADD = $(LDADD) meta_surface_pattern_DEPENDENCIES = $(am__DEPENDENCIES_1) \ libcairotest.la $(am__DEPENDENCIES_1) +miter_precision_SOURCES = miter-precision.c +miter_precision_OBJECTS = miter-precision.$(OBJEXT) +miter_precision_LDADD = $(LDADD) +miter_precision_DEPENDENCIES = $(am__DEPENDENCIES_1) libcairotest.la \ + $(am__DEPENDENCIES_1) move_to_show_surface_SOURCES = move-to-show-surface.c move_to_show_surface_OBJECTS = move-to-show-surface.$(OBJEXT) move_to_show_surface_LDADD = $(LDADD) @@ -918,36 +930,37 @@ SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ ft-text-vertical-layout-type1.c \ ft-text-vertical-layout-type3.c get-and-set.c get-clip.c \ get-group-target.c get-path-extents.c glyph-cache-pressure.c \ - gradient-alpha.c imagediff.c in-fill-empty-trapezoid.c \ - infinite-join.c invalid-matrix.c leaky-dash.c leaky-polygon.c \ - line-width.c line-width-scale.c line-width-zero.c \ - linear-gradient.c linear-gradient-reflect.c long-lines.c \ - mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ - meta-surface-pattern.c move-to-show-surface.c multi-page.c \ - new-sub-path.c nil-surface.c operator-clear.c \ - operator-source.c over-above-source.c over-around-source.c \ - over-below-source.c over-between-source.c paint.c \ - paint-repeat.c paint-source-alpha.c paint-with-alpha.c \ - pattern-get-type.c pattern-getters.c pdf-features.c pdf2png.c \ - pixman-rotate.c png-flatten.c ps-features.c \ - pthread-show-text.c push-group.c radial-gradient.c \ - random-intersections.c rectangle-rounding-error.c \ - rectilinear-stroke.c rel-path.c rgb24-ignore-alpha.c \ - rotate-image-surface-paint.c scale-down-source-surface-paint.c \ - scale-source-surface-paint.c select-font-face.c \ - select-font-no-show-text.c self-copy.c self-intersecting.c \ - set-source.c show-glyphs-many.c show-text-current-point.c \ - skew-extreme.c solid-pattern-cache-stress.c source-clip.c \ - source-clip-scale.c source-surface-scale-paint.c \ - surface-finish-twice.c surface-pattern.c \ - surface-pattern-big-scale-down.c surface-pattern-scale-down.c \ - surface-pattern-scale-up.c svg-clip.c svg-surface.c svg2png.c \ - text-antialias-gray.c text-antialias-none.c \ - text-antialias-subpixel.c text-cache-crash.c \ - text-glyph-range.c text-pattern.c text-rotate.c \ - text-zero-len.c transforms.c translate-show-surface.c \ - trap-clip.c truetype-tables.c unantialiased-shapes.c \ - unbounded-operator.c user-data.c xlib-surface.c zero-alpha.c + gradient-alpha.c gradient-zero-stops.c imagediff.c \ + in-fill-empty-trapezoid.c infinite-join.c invalid-matrix.c \ + leaky-dash.c leaky-polygon.c line-width.c line-width-scale.c \ + line-width-zero.c linear-gradient.c linear-gradient-reflect.c \ + long-lines.c mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ + meta-surface-pattern.c miter-precision.c \ + move-to-show-surface.c multi-page.c new-sub-path.c \ + nil-surface.c operator-clear.c operator-source.c \ + over-above-source.c over-around-source.c over-below-source.c \ + over-between-source.c paint.c paint-repeat.c \ + paint-source-alpha.c paint-with-alpha.c pattern-get-type.c \ + pattern-getters.c pdf-features.c pdf2png.c pixman-rotate.c \ + png-flatten.c ps-features.c pthread-show-text.c push-group.c \ + radial-gradient.c random-intersections.c \ + rectangle-rounding-error.c rectilinear-stroke.c rel-path.c \ + rgb24-ignore-alpha.c rotate-image-surface-paint.c \ + scale-down-source-surface-paint.c scale-source-surface-paint.c \ + select-font-face.c select-font-no-show-text.c self-copy.c \ + self-intersecting.c set-source.c show-glyphs-many.c \ + show-text-current-point.c skew-extreme.c \ + solid-pattern-cache-stress.c source-clip.c source-clip-scale.c \ + source-surface-scale-paint.c surface-finish-twice.c \ + surface-pattern.c surface-pattern-big-scale-down.c \ + surface-pattern-scale-down.c surface-pattern-scale-up.c \ + svg-clip.c svg-surface.c svg2png.c text-antialias-gray.c \ + text-antialias-none.c text-antialias-subpixel.c \ + text-cache-crash.c text-glyph-range.c text-pattern.c \ + text-rotate.c text-zero-len.c transforms.c \ + translate-show-surface.c trap-clip.c truetype-tables.c \ + unantialiased-shapes.c unbounded-operator.c user-data.c \ + xlib-surface.c zero-alpha.c DIST_SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ bitmap-font.c caps-joins.c caps-joins-alpha.c caps-sub-paths.c \ clip-all.c clip-empty.c clip-fill-rule.c \ @@ -969,36 +982,37 @@ DIST_SOURCES = $(libcairotest_la_SOURCES) a8-mask.c big-trap.c \ ft-text-vertical-layout-type1.c \ ft-text-vertical-layout-type3.c get-and-set.c get-clip.c \ get-group-target.c get-path-extents.c glyph-cache-pressure.c \ - gradient-alpha.c imagediff.c in-fill-empty-trapezoid.c \ - infinite-join.c invalid-matrix.c leaky-dash.c leaky-polygon.c \ - line-width.c line-width-scale.c line-width-zero.c \ - linear-gradient.c linear-gradient-reflect.c long-lines.c \ - mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ - meta-surface-pattern.c move-to-show-surface.c multi-page.c \ - new-sub-path.c nil-surface.c operator-clear.c \ - operator-source.c over-above-source.c over-around-source.c \ - over-below-source.c over-between-source.c paint.c \ - paint-repeat.c paint-source-alpha.c paint-with-alpha.c \ - pattern-get-type.c pattern-getters.c pdf-features.c pdf2png.c \ - pixman-rotate.c png-flatten.c ps-features.c \ - pthread-show-text.c push-group.c radial-gradient.c \ - random-intersections.c rectangle-rounding-error.c \ - rectilinear-stroke.c rel-path.c rgb24-ignore-alpha.c \ - rotate-image-surface-paint.c scale-down-source-surface-paint.c \ - scale-source-surface-paint.c select-font-face.c \ - select-font-no-show-text.c self-copy.c self-intersecting.c \ - set-source.c show-glyphs-many.c show-text-current-point.c \ - skew-extreme.c solid-pattern-cache-stress.c source-clip.c \ - source-clip-scale.c source-surface-scale-paint.c \ - surface-finish-twice.c surface-pattern.c \ - surface-pattern-big-scale-down.c surface-pattern-scale-down.c \ - surface-pattern-scale-up.c svg-clip.c svg-surface.c svg2png.c \ - text-antialias-gray.c text-antialias-none.c \ - text-antialias-subpixel.c text-cache-crash.c \ - text-glyph-range.c text-pattern.c text-rotate.c \ - text-zero-len.c transforms.c translate-show-surface.c \ - trap-clip.c truetype-tables.c unantialiased-shapes.c \ - unbounded-operator.c user-data.c xlib-surface.c zero-alpha.c + gradient-alpha.c gradient-zero-stops.c imagediff.c \ + in-fill-empty-trapezoid.c infinite-join.c invalid-matrix.c \ + leaky-dash.c leaky-polygon.c line-width.c line-width-scale.c \ + line-width-zero.c linear-gradient.c linear-gradient-reflect.c \ + long-lines.c mask.c mask-alpha.c mask-ctm.c mask-surface-ctm.c \ + meta-surface-pattern.c miter-precision.c \ + move-to-show-surface.c multi-page.c new-sub-path.c \ + nil-surface.c operator-clear.c operator-source.c \ + over-above-source.c over-around-source.c over-below-source.c \ + over-between-source.c paint.c paint-repeat.c \ + paint-source-alpha.c paint-with-alpha.c pattern-get-type.c \ + pattern-getters.c pdf-features.c pdf2png.c pixman-rotate.c \ + png-flatten.c ps-features.c pthread-show-text.c push-group.c \ + radial-gradient.c random-intersections.c \ + rectangle-rounding-error.c rectilinear-stroke.c rel-path.c \ + rgb24-ignore-alpha.c rotate-image-surface-paint.c \ + scale-down-source-surface-paint.c scale-source-surface-paint.c \ + select-font-face.c select-font-no-show-text.c self-copy.c \ + self-intersecting.c set-source.c show-glyphs-many.c \ + show-text-current-point.c skew-extreme.c \ + solid-pattern-cache-stress.c source-clip.c source-clip-scale.c \ + source-surface-scale-paint.c surface-finish-twice.c \ + surface-pattern.c surface-pattern-big-scale-down.c \ + surface-pattern-scale-down.c surface-pattern-scale-up.c \ + svg-clip.c svg-surface.c svg2png.c text-antialias-gray.c \ + text-antialias-none.c text-antialias-subpixel.c \ + text-cache-crash.c text-glyph-range.c text-pattern.c \ + text-rotate.c text-zero-len.c transforms.c \ + translate-show-surface.c trap-clip.c truetype-tables.c \ + unantialiased-shapes.c unbounded-operator.c user-data.c \ + xlib-surface.c zero-alpha.c RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ @@ -1034,6 +1048,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ @@ -1237,50 +1253,73 @@ xlib_xrender_LIBS = @xlib_xrender_LIBS@ SUBDIRS = pdiff . # Here are all the tests that are run unconditionally -TESTS = a8-mask big-trap caps-joins caps-joins-alpha caps-sub-paths \ - clip-all clip-empty clip-fill-rule \ - clip-fill-rule-pixel-aligned clip-nesting clip-operator \ - clip-push-group clip-twice clip-zero close-path \ - composite-integer-translate-source \ - composite-integer-translate-over \ - composite-integer-translate-over-repeat copy-path \ - create-for-stream create-from-png create-from-png-stream \ - dash-caps-joins dash-no-dash dash-offset-negative dash-scale \ - dash-zero-length dash-state degenerate-path degenerate-pen \ - device-offset device-offset-positive extend-pad \ - fill-and-stroke fill-and-stroke-alpha \ - fill-and-stroke-alpha-add fill-degenerate-sort-order \ - fill-missed-stop fill-rule filter-nearest-offset \ - font-face-get-type font-matrix-translation \ - glyph-cache-pressure get-and-set get-clip get-group-target \ - get-path-extents gradient-alpha infinite-join \ - in-fill-empty-trapezoid invalid-matrix leaky-dash \ - leaky-polygon line-width line-width-scale line-width-zero \ - linear-gradient linear-gradient-reflect long-lines mask \ - mask-alpha mask-ctm mask-surface-ctm meta-surface-pattern \ - move-to-show-surface new-sub-path nil-surface operator-clear \ - operator-source over-above-source over-around-source \ - over-below-source over-between-source paint paint-repeat \ - paint-source-alpha paint-with-alpha pattern-get-type \ - pattern-getters pixman-rotate radial-gradient \ - random-intersections rectangle-rounding-error \ - rectilinear-stroke rgb24-ignore-alpha \ - rotate-image-surface-paint scale-down-source-surface-paint \ - scale-source-surface-paint select-font-face \ - select-font-no-show-text self-copy self-intersecting \ - set-source show-text-current-point skew-extreme \ - solid-pattern-cache-stress source-clip source-clip-scale \ - source-surface-scale-paint surface-finish-twice \ - surface-pattern surface-pattern-big-scale-down \ - surface-pattern-scale-down surface-pattern-scale-up \ - text-antialias-gray text-antialias-none \ - text-antialias-subpixel text-cache-crash text-pattern \ - text-rotate text-zero-len transforms translate-show-surface \ - trap-clip truetype-tables unantialiased-shapes \ - unbounded-operator user-data rel-path push-group zero-alpha \ - $(am__append_1) $(am__append_2) $(am__append_3) \ - $(am__append_4) $(am__append_5) $(am__append_6) \ - $(am__append_7) $(am__append_8) +TESTS = a8-mask$(EXEEXT) big-trap$(EXEEXT) caps-joins$(EXEEXT) \ + caps-joins-alpha$(EXEEXT) caps-sub-paths$(EXEEXT) \ + clip-all$(EXEEXT) clip-empty$(EXEEXT) clip-fill-rule$(EXEEXT) \ + clip-fill-rule-pixel-aligned$(EXEEXT) clip-nesting$(EXEEXT) \ + clip-operator$(EXEEXT) clip-push-group$(EXEEXT) \ + clip-twice$(EXEEXT) clip-zero$(EXEEXT) close-path$(EXEEXT) \ + composite-integer-translate-source$(EXEEXT) \ + composite-integer-translate-over$(EXEEXT) \ + composite-integer-translate-over-repeat$(EXEEXT) \ + copy-path$(EXEEXT) create-for-stream$(EXEEXT) \ + create-from-png$(EXEEXT) create-from-png-stream$(EXEEXT) \ + dash-caps-joins$(EXEEXT) dash-no-dash$(EXEEXT) \ + dash-offset-negative$(EXEEXT) dash-scale$(EXEEXT) \ + dash-state$(EXEEXT) dash-zero-length$(EXEEXT) \ + degenerate-path$(EXEEXT) degenerate-pen$(EXEEXT) \ + device-offset$(EXEEXT) device-offset-positive$(EXEEXT) \ + extend-pad$(EXEEXT) fill-and-stroke$(EXEEXT) \ + fill-and-stroke-alpha$(EXEEXT) \ + fill-and-stroke-alpha-add$(EXEEXT) \ + fill-degenerate-sort-order$(EXEEXT) fill-missed-stop$(EXEEXT) \ + fill-rule$(EXEEXT) filter-nearest-offset$(EXEEXT) \ + font-face-get-type$(EXEEXT) font-matrix-translation$(EXEEXT) \ + glyph-cache-pressure$(EXEEXT) get-and-set$(EXEEXT) \ + get-clip$(EXEEXT) get-group-target$(EXEEXT) \ + get-path-extents$(EXEEXT) gradient-alpha$(EXEEXT) \ + gradient-zero-stops$(EXEEXT) infinite-join$(EXEEXT) \ + in-fill-empty-trapezoid$(EXEEXT) invalid-matrix$(EXEEXT) \ + leaky-dash$(EXEEXT) leaky-polygon$(EXEEXT) line-width$(EXEEXT) \ + line-width-scale$(EXEEXT) line-width-zero$(EXEEXT) \ + linear-gradient$(EXEEXT) linear-gradient-reflect$(EXEEXT) \ + long-lines$(EXEEXT) mask$(EXEEXT) mask-alpha$(EXEEXT) \ + mask-ctm$(EXEEXT) mask-surface-ctm$(EXEEXT) \ + meta-surface-pattern$(EXEEXT) miter-precision$(EXEEXT) \ + move-to-show-surface$(EXEEXT) new-sub-path$(EXEEXT) \ + nil-surface$(EXEEXT) operator-clear$(EXEEXT) \ + operator-source$(EXEEXT) over-above-source$(EXEEXT) \ + over-around-source$(EXEEXT) over-below-source$(EXEEXT) \ + over-between-source$(EXEEXT) paint$(EXEEXT) \ + paint-repeat$(EXEEXT) paint-source-alpha$(EXEEXT) \ + paint-with-alpha$(EXEEXT) pattern-get-type$(EXEEXT) \ + pattern-getters$(EXEEXT) pixman-rotate$(EXEEXT) \ + push-group$(EXEEXT) radial-gradient$(EXEEXT) \ + random-intersections$(EXEEXT) \ + rectangle-rounding-error$(EXEEXT) rectilinear-stroke$(EXEEXT) \ + rel-path$(EXEEXT) rgb24-ignore-alpha$(EXEEXT) \ + rotate-image-surface-paint$(EXEEXT) \ + scale-down-source-surface-paint$(EXEEXT) \ + scale-source-surface-paint$(EXEEXT) select-font-face$(EXEEXT) \ + select-font-no-show-text$(EXEEXT) self-copy$(EXEEXT) \ + self-intersecting$(EXEEXT) set-source$(EXEEXT) \ + show-text-current-point$(EXEEXT) skew-extreme$(EXEEXT) \ + solid-pattern-cache-stress$(EXEEXT) source-clip$(EXEEXT) \ + source-clip-scale$(EXEEXT) source-surface-scale-paint$(EXEEXT) \ + surface-finish-twice$(EXEEXT) surface-pattern$(EXEEXT) \ + surface-pattern-big-scale-down$(EXEEXT) \ + surface-pattern-scale-down$(EXEEXT) \ + surface-pattern-scale-up$(EXEEXT) text-antialias-gray$(EXEEXT) \ + text-antialias-none$(EXEEXT) text-antialias-subpixel$(EXEEXT) \ + text-cache-crash$(EXEEXT) text-pattern$(EXEEXT) \ + text-rotate$(EXEEXT) text-zero-len$(EXEEXT) \ + transforms$(EXEEXT) translate-show-surface$(EXEEXT) \ + trap-clip$(EXEEXT) truetype-tables$(EXEEXT) \ + unantialiased-shapes$(EXEEXT) unbounded-operator$(EXEEXT) \ + user-data$(EXEEXT) zero-alpha$(EXEEXT) $(am__append_1) \ + $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) $(am__append_6) $(am__append_7) \ + $(am__append_8) # XXX: Here are some existing tests that are currently disabled for # one reason or another. They can still be built and run (manually) @@ -1323,9 +1362,9 @@ TESTS = a8-mask big-trap caps-joins caps-joins-alpha caps-sub-paths \ # that's just a bug in the test rig that should just consider # the abort an XFAIL like any other. DISABLED_TESTS = \ -extend-reflect \ -show-glyphs-many \ -text-glyph-range +extend-reflect$(EXEEXT) \ +show-glyphs-many$(EXEEXT) \ +text-glyph-range$(EXEEXT) # All tests which have a reference image go here. @@ -1344,18 +1383,24 @@ REFERENCE_IMAGES = \ clip-fill-rule-pixel-aligned-ref.png \ clip-fill-rule-pixel-aligned-rgb24-ref.png \ clip-fill-rule-ps-argb32-ref.png \ + clip-fill-rule-ps-rgb24-ref.png \ clip-fill-rule-ref.png \ clip-fill-rule-rgb24-ref.png \ clip-nesting-ps-argb32-ref.png \ + clip-nesting-ps-rgb24-ref.png \ clip-nesting-quartz-ref.png \ clip-nesting-quartz-rgb24-ref.png \ clip-nesting-ref.png \ clip-nesting-rgb24-ref.png \ clip-operator-ref.png \ + clip-operator-ps-argb32-ref.png \ clip-operator-rgb24-ref.png \ + clip-push-group-ps-argb32-ref.png \ + clip-push-group-ps-rgb24-ref.png \ clip-push-group-quartz-ref.png \ clip-push-group-ref.png \ clip-twice-ps-argb32-ref.png \ + clip-twice-ps-rgb24-ref.png \ clip-twice-quartz-ref.png \ clip-twice-quartz-rgb24-ref.png \ clip-twice-ref.png \ @@ -1365,17 +1410,21 @@ REFERENCE_IMAGES = \ composite-integer-translate-over-repeat-ref.png \ composite-integer-translate-source-ref.png \ copy-path-ps-argb32-ref.png \ + copy-path-ps-rgb24-ref.png \ copy-path-ref.png \ create-from-png-ref.png \ create-from-png-stream-ref.png \ dash-caps-joins-ps-argb32-ref.png \ + dash-caps-joins-ps-rgb24-ref.png \ dash-caps-joins-quartz-ref.png \ dash-caps-joins-ref.png \ dash-no-dash-ref.png \ dash-offset-negative-ref.png \ dash-scale-ps-argb32-ref.png \ + dash-scale-ps-rgb24-ref.png \ dash-scale-ref.png \ dash-state-ps-argb32-ref.png \ + dash-state-ps-rgb24-ref.png \ dash-state-ref.png \ dash-zero-length-ps-argb32-ref.png \ dash-zero-length-ref.png \ @@ -1383,6 +1432,7 @@ REFERENCE_IMAGES = \ degenerate-pen-ref.png \ degenerate-pen-ps-argb32-ref.png \ degenerate-path-ps-argb32-ref.png \ + degenerate-path-ps-rgb24-ref.png \ degenerate-path-ref.png \ degenerate-path-rgb24-ref.png \ device-offset-positive-ref.png \ @@ -1396,6 +1446,7 @@ REFERENCE_IMAGES = \ fill-and-stroke-alpha-quartz-ref.png \ fill-and-stroke-alpha-ref.png \ fill-and-stroke-ps-argb32-ref.png \ + fill-and-stroke-ps-rgb24-ref.png \ fill-and-stroke-quartz-ref.png \ fill-and-stroke-quartz-rgb24-ref.png \ fill-and-stroke-ref.png \ @@ -1405,6 +1456,7 @@ REFERENCE_IMAGES = \ fill-degenerate-sort-order-ref.png \ fill-degenerate-sort-order-rgb24-ref.png \ fill-missed-stop-ps-argb32-ref.png \ + fill-missed-stop-ps-rgb24-ref.png \ fill-missed-stop-ref.png \ fill-missed-stop-rgb24-ref.png \ fill-rule-ps-argb32-ref.png \ @@ -1414,6 +1466,7 @@ REFERENCE_IMAGES = \ fill-rule-rgb24-ref.png \ filter-nearest-offset-ref.png \ font-matrix-translation-ps-argb32-ref.png \ + font-matrix-translation-ps-rgb24-ref.png \ font-matrix-translation-ref.png \ font-matrix-translation-svg-ref.png \ ft-text-antialias-none-ps-argb32-ref.png \ @@ -1426,17 +1479,25 @@ REFERENCE_IMAGES = \ ft-text-vertical-layout-type3-svg-ref.png \ get-group-target-ref.png \ glyph-cache-pressure-ref.png \ + gradient-alpha-ps-argb32-ref.png \ + gradient-alpha-ps-rgb24-ref.png \ gradient-alpha-ref.png \ gradient-alpha-rgb24-ref.png \ + gradient-zero-stops-ref.png \ + gradient-zero-stops-rgb24-ref.png \ infinite-join-ref.png \ leaky-dash-ps-argb32-ref.png \ + leaky-dash-ps-rgb24-ref.png \ leaky-dash-ref.png \ leaky-polygon-ref.png \ linear-gradient-reflect-ref.png \ + linear-gradient-ps-argb32-ref.png \ + linear-gradient-ps-rgb24-ref.png \ linear-gradient-ref.png \ linear-gradient-svg-ref.png \ line-width-ref.png \ line-width-scale-ps-argb32-ref.png \ + line-width-scale-ps-rgb24-ref.png \ line-width-scale-ref.png \ long-lines-ref.png \ mask-alpha-ref.png \ @@ -1453,8 +1514,10 @@ REFERENCE_IMAGES = \ mask-svg-argb32-ref.png \ meta-surface-pattern-ref.png \ meta-surface-pattern-rgb24-ref.png \ + miter-precision-ref.png \ move-to-show-surface-ref.png \ new-sub-path-ps-argb32-ref.png \ + new-sub-path-ps-rgb24-ref.png \ new-sub-path-quartz-ref.png \ new-sub-path-quartz-rgb24-ref.png \ new-sub-path-ref.png \ @@ -1465,6 +1528,8 @@ REFERENCE_IMAGES = \ operator-clear-quartz-rgb24-ref.png \ operator-clear-ref.png \ operator-clear-rgb24-ref.png \ + operator-source-ps-argb32-ref.png \ + operator-source-ps-rgb24-ref.png \ operator-source-ref.png \ operator-source-rgb24-ref.png \ over-above-source-ps-argb32-ref.png \ @@ -1487,6 +1552,8 @@ REFERENCE_IMAGES = \ paint-with-alpha-ref.png \ paint-with-alpha-svg-ref.png \ pattern-getters-ref.png \ + pixman-rotate-ps-argb32-ref.png \ + pixman-rotate-ps-rgb24-ref.png \ pixman-rotate-ref.png \ pixman-rotate-rgb24-ref.png \ push-group-ref.png \ @@ -1495,16 +1562,19 @@ REFERENCE_IMAGES = \ radial-gradient-ref.png \ radial-gradient-svg-ref.png \ random-intersections-ps-argb32-ref.png \ + random-intersections-ps-rgb24-ref.png \ random-intersections-ref.png \ rgb24-ignore-alpha-ref.png \ rectangle-rounding-error-ref.png \ rectilinear-stroke-ref.png \ rel-path-quartz-ref.png \ rel-path-quartz-rgb24-ref.png \ + rel-path-ps-rgb24-ref.png \ rel-path-ref.png \ rel-path-rgb24-ref.png \ rotate-image-surface-paint-pdf-argb32-ref.png \ rotate-image-surface-paint-ps-argb32-ref.png \ + rotate-image-surface-paint-ps-rgb24-ref.png \ rotate-image-surface-paint-ref.png \ rotate-image-surface-paint-svg-ref.png \ scale-down-source-surface-paint-ref.png \ @@ -1525,10 +1595,13 @@ REFERENCE_IMAGES = \ skew-extreme-ref.png \ source-clip-ref.png \ source-clip-scale-quartz-ref.png \ + source-clip-scale-ps-argb32-ref.png \ + source-clip-scale-ps-rgb24-ref.png \ source-clip-scale-ref.png \ source-clip-scale-svg-ref.png \ source-surface-scale-paint-ref.png \ source-surface-scale-paint-rgb24-ref.png \ + surface-pattern-big-scale-down-ref.png \ surface-pattern-pdf-argb32-ref.png \ surface-pattern-ps-argb32-ref.png \ surface-pattern-ref.png \ @@ -1544,11 +1617,14 @@ REFERENCE_IMAGES = \ text-antialias-subpixel-ref.png \ text-glyph-range-ref.png \ text-glyph-range-rgb24-ref.png \ + text-pattern-ps-argb32-ref.png \ + text-pattern-ps-rgb24-ref.png \ text-pattern-ref.png \ text-pattern-rgb24-ref.png \ text-pattern-svg-argb32-ref.png \ text-pattern-svg-rgb24-ref.png \ text-rotate-ps-argb32-ref.png \ + text-rotate-ps-rgb24-ref.png \ text-rotate-ref.png \ text-rotate-svg-ref.png \ text-zero-len-ref.png \ @@ -1557,6 +1633,7 @@ REFERENCE_IMAGES = \ trap-clip-quartz-ref.png \ trap-clip-quartz-rgb24-ref.png \ trap-clip-ps-argb32-ref.png \ + trap-clip-ps-rgb24-ref.png \ trap-clip-ref.png \ trap-clip-rgb24-ref.png \ unantialiased-shapes-ref.png \ @@ -1585,21 +1662,20 @@ $(REFERENCE_IMAGES) # Also, any test listed here should call cairo_test_expect_failure and # provide an explanation for the expected failure. XFAIL_TESTS = \ -a8-mask \ -big-trap \ -extend-pad \ -filter-nearest-offset \ -long-lines \ -self-intersecting \ -surface-pattern \ -surface-pattern-big-scale-down \ -surface-pattern-scale-down \ -surface-pattern-scale-up +a8-mask$(EXEEXT) \ +big-trap$(EXEEXT) \ +extend-pad$(EXEEXT) \ +filter-nearest-offset$(EXEEXT) \ +long-lines$(EXEEXT) \ +self-intersecting$(EXEEXT) \ +surface-pattern$(EXEEXT) \ +surface-pattern-big-scale-down$(EXEEXT) \ +surface-pattern-scale-down$(EXEEXT) \ +surface-pattern-scale-up$(EXEEXT) # Any test that doesn't generate a log file goes here NOLOG_TESTS = \ -create-for-stream \ user-data \ svg-surface \ svg-clip \ @@ -1649,7 +1725,7 @@ LDADD = $(CAIRO_LDADD) libcairotest.la $(am__append_9) # and TARGETS make var on the command line. Same for the rest. TARGETS = $(CAIRO_TEST_TARGET) TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE) -TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" +TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS:$(EXEEXT)=)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS) VALGRIND_FLAGS = \ --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \ @@ -1664,8 +1740,8 @@ CLEANFILES = \ # The following definitions both should work. -#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` -FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` +#FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo` +FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log */ /g; s/^ //; s/ $$//'` recheck = check TESTS="$(FAILED_TESTS)" NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log) all: all-recursive @@ -1875,6 +1951,9 @@ glyph-cache-pressure$(EXEEXT): $(glyph_cache_pressure_OBJECTS) $(glyph_cache_pre gradient-alpha$(EXEEXT): $(gradient_alpha_OBJECTS) $(gradient_alpha_DEPENDENCIES) @rm -f gradient-alpha$(EXEEXT) $(LINK) $(gradient_alpha_LDFLAGS) $(gradient_alpha_OBJECTS) $(gradient_alpha_LDADD) $(LIBS) +gradient-zero-stops$(EXEEXT): $(gradient_zero_stops_OBJECTS) $(gradient_zero_stops_DEPENDENCIES) + @rm -f gradient-zero-stops$(EXEEXT) + $(LINK) $(gradient_zero_stops_LDFLAGS) $(gradient_zero_stops_OBJECTS) $(gradient_zero_stops_LDADD) $(LIBS) imagediff$(EXEEXT): $(imagediff_OBJECTS) $(imagediff_DEPENDENCIES) @rm -f imagediff$(EXEEXT) $(LINK) $(imagediff_LDFLAGS) $(imagediff_OBJECTS) $(imagediff_LDADD) $(LIBS) @@ -1926,6 +2005,9 @@ mask-surface-ctm$(EXEEXT): $(mask_surface_ctm_OBJECTS) $(mask_surface_ctm_DEPEND meta-surface-pattern$(EXEEXT): $(meta_surface_pattern_OBJECTS) $(meta_surface_pattern_DEPENDENCIES) @rm -f meta-surface-pattern$(EXEEXT) $(LINK) $(meta_surface_pattern_LDFLAGS) $(meta_surface_pattern_OBJECTS) $(meta_surface_pattern_LDADD) $(LIBS) +miter-precision$(EXEEXT): $(miter_precision_OBJECTS) $(miter_precision_DEPENDENCIES) + @rm -f miter-precision$(EXEEXT) + $(LINK) $(miter_precision_LDFLAGS) $(miter_precision_OBJECTS) $(miter_precision_LDADD) $(LIBS) move-to-show-surface$(EXEEXT): $(move_to_show_surface_OBJECTS) $(move_to_show_surface_DEPENDENCIES) @rm -f move-to-show-surface$(EXEEXT) $(LINK) $(move_to_show_surface_LDFLAGS) $(move_to_show_surface_OBJECTS) $(move_to_show_surface_LDADD) $(LIBS) @@ -2197,6 +2279,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get-path-extents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyph-cache-pressure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-alpha.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-zero-stops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imagediff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/in-fill-empty-trapezoid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/infinite-join.Po@am__quote@ @@ -2214,6 +2297,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask-surface-ctm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meta-surface-pattern.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miter-precision.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move-to-show-surface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi-page.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/new-sub-path.Po@am__quote@ @@ -2592,7 +2676,7 @@ distdir: $(DISTFILES) done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: check-recursive all-am: Makefile installdirs: installdirs-recursive @@ -2674,19 +2758,38 @@ uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ - clean-local clean-recursive ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am - + check-am check-local clean clean-checkPROGRAMS clean-generic \ + clean-libtool clean-local clean-recursive ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-info-am + + +# A hook that summarises the failures +check: AM_MAKEFLAGS+=-k +check-local: + @FAILED_TESTS=""; \ + for t in *.log; do \ + if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \ + FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \ + fi; \ + done; \ + if test -n "$$FAILED_TESTS"; then \ + echo "Failed tests:"; \ + for t in $$FAILED_TESTS; do \ + echo -n " $$t: "; \ + grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \ + echo; \ + done; \ + fi $(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo.la cd $(top_builddir)/boilerplate && $(MAKE) $(AM_MAKEFLAGS) libcairoboilerplate.la @@ -2735,7 +2838,7 @@ retest: # Make index.html with no dependency tracking. html: @echo Creating index.html - @perl $(srcdir)/make-html.pl $(TESTS:=.log) > index.html + @perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html # Make index.html with no dependency tracking, containing only the failed tests. rehtml: @@ -2747,7 +2850,7 @@ rehtml: $(NOLOG_TESTS_LOG): echo dummy > $@ -index.html: $(srcdir)/make-html.pl $(TESTS:=.log) +index.html: $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) @echo Creating index.html @perl $^ > $@ diff --git a/test/cairo-test.c b/test/cairo-test.c index f036163..8fbd5e3 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -241,7 +241,7 @@ cairo_test_target_has_similar (const cairo_test_t *test, cairo_boilerplate_targe cairo_t * cr = cairo_create (surface); cairo_surface_t *similar; cairo_push_group_with_content (cr, target->content); - similar = cairo_get_target (cr); + similar = cairo_get_group_target (cr); has_similar = cairo_surface_get_type (similar) == cairo_surface_get_type (surface); cairo_destroy (cr); @@ -373,7 +373,9 @@ cairo_test_for_target (cairo_test_t *test, cairo_set_font_options (cr, font_options); cairo_font_options_destroy (font_options); + cairo_save (cr); status = (test->draw) (cr, test->width, test->height); + cairo_restore (cr); /* Then, check all the different ways it could fail. */ if (status) { @@ -384,6 +386,7 @@ cairo_test_for_target (cairo_test_t *test, if (similar) { cairo_pop_group_to_source (cr); + cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); cairo_paint (cr); } diff --git a/test/clip-fill-rule-ps-rgb24-ref.png b/test/clip-fill-rule-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..60e43c4 --- /dev/null +++ b/test/clip-fill-rule-ps-rgb24-ref.png diff --git a/test/clip-nesting-ps-rgb24-ref.png b/test/clip-nesting-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..8238deb --- /dev/null +++ b/test/clip-nesting-ps-rgb24-ref.png diff --git a/test/clip-nesting.c b/test/clip-nesting.c index 2d53782..09f77fd 100644 --- a/test/clip-nesting.c +++ b/test/clip-nesting.c @@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *target_surface; cairo_t *cr2, *cr3; - target_surface = cairo_get_target (cr); + target_surface = cairo_get_group_target (cr); cr2 = cairo_create (target_surface); diff --git a/test/clip-operator-ps-argb32-ref.png b/test/clip-operator-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..1d49920 --- /dev/null +++ b/test/clip-operator-ps-argb32-ref.png diff --git a/test/clip-operator.c b/test/clip-operator.c index 0745e16..3bfb5ba 100644 --- a/test/clip-operator.c +++ b/test/clip-operator.c @@ -42,7 +42,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/clip-push-group-ps-argb32-ref.png b/test/clip-push-group-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..31b3284 --- /dev/null +++ b/test/clip-push-group-ps-argb32-ref.png diff --git a/test/clip-push-group-ps-rgb24-ref.png b/test/clip-push-group-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..31b3284 --- /dev/null +++ b/test/clip-push-group-ps-rgb24-ref.png diff --git a/test/clip-twice-ps-rgb24-ref.png b/test/clip-twice-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..8a121c4 --- /dev/null +++ b/test/clip-twice-ps-rgb24-ref.png diff --git a/test/clip-zero.c b/test/clip-zero.c index ec2dcc8..bf96d8c 100644 --- a/test/clip-zero.c +++ b/test/clip-zero.c @@ -60,7 +60,7 @@ draw (cairo_t *cr, int width, int height) cairo_mask (cr, cairo_get_source (cr)); - surf = cairo_surface_create_similar (cairo_get_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 0, 0); + surf = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, 0, 0); pat = cairo_pattern_create_for_surface (surf); cairo_surface_destroy (surf); diff --git a/test/copy-path-ps-rgb24-ref.png b/test/copy-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..aa27262 --- /dev/null +++ b/test/copy-path-ps-rgb24-ref.png diff --git a/test/create-for-stream.c b/test/create-for-stream.c index d6cb23b..379412f 100644 --- a/test/create-for-stream.c +++ b/test/create-for-stream.c @@ -225,19 +225,22 @@ test_surface (const char *backend, return CAIRO_TEST_SUCCESS; } - int main (void) { cairo_test_status_t status = CAIRO_TEST_SUCCESS; cairo_test_status_t test_status; + const char test_name[] = "create-for-stream"; - cairo_test_init ("create-for-stream"); + cairo_test_init (test_name); #if CAIRO_HAS_PS_SURFACE test_status = test_surface ("ps", "create-for-stream.ps", cairo_ps_surface_create, cairo_ps_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "ps", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -246,6 +249,9 @@ main (void) test_status = test_surface ("pdf", "create-for-stream.pdf", cairo_pdf_surface_create, cairo_pdf_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "pdf", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -254,6 +260,9 @@ main (void) test_status = test_surface ("svg", "create-for-stream.svg", cairo_svg_surface_create, cairo_svg_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "svg", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif diff --git a/test/dash-caps-joins-ps-rgb24-ref.png b/test/dash-caps-joins-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c62f48d --- /dev/null +++ b/test/dash-caps-joins-ps-rgb24-ref.png diff --git a/test/dash-scale-ps-rgb24-ref.png b/test/dash-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..5a92f55 --- /dev/null +++ b/test/dash-scale-ps-rgb24-ref.png diff --git a/test/dash-state-ps-rgb24-ref.png b/test/dash-state-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..e655974 --- /dev/null +++ b/test/dash-state-ps-rgb24-ref.png diff --git a/test/degenerate-path-ps-rgb24-ref.png b/test/degenerate-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..99e6c66 --- /dev/null +++ b/test/degenerate-path-ps-rgb24-ref.png diff --git a/test/device-offset-positive.c b/test/device-offset-positive.c index 9080612..ab1adcf 100644 --- a/test/device-offset-positive.c +++ b/test/device-offset-positive.c @@ -59,7 +59,7 @@ draw (cairo_t *cr, int width, int height) draw_square (cr); /* Then, create an offset surface and repeat the drawing in red. */ - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); surface = cairo_surface_create_similar (target, cairo_surface_get_content (target), SIZE / 2, SIZE / 2); diff --git a/test/device-offset.c b/test/device-offset.c index 5f0eb80..cee603f 100644 --- a/test/device-offset.c +++ b/test/device-offset.c @@ -59,7 +59,7 @@ draw (cairo_t *cr, int width, int height) draw_square (cr); /* Then, create an offset surface and repeat the drawing in red. */ - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); surface = cairo_surface_create_similar (target, cairo_surface_get_content (target), SIZE / 2, SIZE / 2); diff --git a/test/fill-and-stroke-ps-rgb24-ref.png b/test/fill-and-stroke-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..41e3991 --- /dev/null +++ b/test/fill-and-stroke-ps-rgb24-ref.png diff --git a/test/fill-missed-stop-ps-rgb24-ref.png b/test/fill-missed-stop-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..fd54c7b --- /dev/null +++ b/test/fill-missed-stop-ps-rgb24-ref.png diff --git a/test/font-matrix-translation-ps-rgb24-ref.png b/test/font-matrix-translation-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..330a1b5 --- /dev/null +++ b/test/font-matrix-translation-ps-rgb24-ref.png diff --git a/test/get-clip.c b/test/get-clip.c index 0de84e9..bd92e1e 100644 --- a/test/get-clip.c +++ b/test/get-clip.c @@ -119,7 +119,7 @@ draw (cairo_t *cr, int width, int height) const char *phase; cairo_bool_t uses_clip_rects; - surface = cairo_surface_create_similar (cairo_get_target (cr), + surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR, 100, 100); /* don't use cr accidentally */ cr = NULL; diff --git a/test/get-path-extents.c b/test/get-path-extents.c index b5af7fa..917039e 100644 --- a/test/get-path-extents.c +++ b/test/get-path-extents.c @@ -105,7 +105,7 @@ draw (cairo_t *cr, int width, int height) cairo_text_extents_t extents; cairo_test_status_t ret = CAIRO_TEST_SUCCESS; - surface = cairo_surface_create_similar (cairo_get_target (cr), + surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR, 100, 100); /* don't use cr accidentally */ cr = NULL; diff --git a/test/gradient-alpha-ps-argb32-ref.png b/test/gradient-alpha-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..8b93c05 --- /dev/null +++ b/test/gradient-alpha-ps-argb32-ref.png diff --git a/test/gradient-alpha-ps-rgb24-ref.png b/test/gradient-alpha-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c3c96cb --- /dev/null +++ b/test/gradient-alpha-ps-rgb24-ref.png diff --git a/test/gradient-zero-stops-ref.png b/test/gradient-zero-stops-ref.png Binary files differnew file mode 100644 index 0000000..3f18670 --- /dev/null +++ b/test/gradient-zero-stops-ref.png diff --git a/test/gradient-zero-stops-rgb24-ref.png b/test/gradient-zero-stops-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..eb24e4b --- /dev/null +++ b/test/gradient-zero-stops-rgb24-ref.png diff --git a/test/gradient-zero-stops.c b/test/gradient-zero-stops.c new file mode 100644 index 0000000..0cf145d --- /dev/null +++ b/test/gradient-zero-stops.c @@ -0,0 +1,66 @@ +/* + * Copyright © 2007 Brian Ewins + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Author: Brian Ewins <Brian.Ewins@gmail.com> + */ + +#include "cairo-test.h" + +/* This test case is designed to exercise the following bug: + * + * Crash when trying to paint gradient with no stops + * https://bugzilla.mozilla.org/show_bug.cgi?id=407104 + */ + +static cairo_test_draw_function_t draw; + +cairo_test_t test = { + "gradient-zero-stops", + "Verifies that gradients with no stops dont cause problems.", + 2, 2, + draw +}; + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + cairo_pattern_t *pat; + + pat = cairo_pattern_create_linear (0., 0., 1., 1.); + cairo_set_source (cr, pat); + cairo_paint (cr); + cairo_pattern_destroy (pat); + + pat = cairo_pattern_create_radial (0., 0., 0., 1., 1., 1.); + cairo_set_source (cr, pat); + cairo_paint (cr); + cairo_pattern_destroy (pat); + + return CAIRO_TEST_SUCCESS; +} + +int +main (void) +{ + return cairo_test (&test); +} diff --git a/test/invalid-matrix.c b/test/invalid-matrix.c index d6b4f50..8a5a9bf 100644 --- a/test/invalid-matrix.c +++ b/test/invalid-matrix.c @@ -77,7 +77,7 @@ if ((status) == CAIRO_STATUS_SUCCESS) { \ cairo_matrix_init_identity (&identity); - target = cairo_get_target (cr); + target = cairo_get_group_target (cr); /* test cairo_transform with invalid matrix */ cr2 = cairo_create (target); diff --git a/test/leaky-dash-ps-rgb24-ref.png b/test/leaky-dash-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..c11eb48 --- /dev/null +++ b/test/leaky-dash-ps-rgb24-ref.png diff --git a/test/line-width-scale-ps-rgb24-ref.png b/test/line-width-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..12c5b52 --- /dev/null +++ b/test/line-width-scale-ps-rgb24-ref.png diff --git a/test/linear-gradient-ps-argb32-ref.png b/test/linear-gradient-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..e9202d8 --- /dev/null +++ b/test/linear-gradient-ps-argb32-ref.png diff --git a/test/linear-gradient-ps-rgb24-ref.png b/test/linear-gradient-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..e9202d8 --- /dev/null +++ b/test/linear-gradient-ps-rgb24-ref.png diff --git a/test/mask.c b/test/mask.c index 984b82d..14dd8b3 100644 --- a/test/mask.c +++ b/test/mask.c @@ -75,7 +75,7 @@ mask_polygon (cairo_t *cr, int x, int y) cairo_surface_t *mask_surface; cairo_t *cr2; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, WIDTH, HEIGHT); cr2 = cairo_create (mask_surface); @@ -199,7 +199,7 @@ draw (cairo_t *cr, int width, int height) /* Some of our drawing is unbounded, so we draw each test to * a temporary surface and copy over. */ - tmp_surface = cairo_surface_create_similar (cairo_get_target (cr), + tmp_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, IMAGE_WIDTH, IMAGE_HEIGHT); cr2 = cairo_create (tmp_surface); diff --git a/test/meta-surface-pattern.c b/test/meta-surface-pattern.c index 4d280c7..a047b3e 100644 --- a/test/meta-surface-pattern.c +++ b/test/meta-surface-pattern.c @@ -58,7 +58,7 @@ draw (cairo_t *cr, int width, int height) cairo_translate (cr, PAD, PAD); - pat_surface = cairo_surface_create_similar (cairo_get_target (cr), + pat_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, PAT_WIDTH, PAT_HEIGHT); diff --git a/test/miter-precision-ref.png b/test/miter-precision-ref.png Binary files differnew file mode 100644 index 0000000..c9f7f5b --- /dev/null +++ b/test/miter-precision-ref.png diff --git a/test/miter-precision.c b/test/miter-precision.c new file mode 100644 index 0000000..533c30e --- /dev/null +++ b/test/miter-precision.c @@ -0,0 +1,80 @@ +/* + * Copyright © 2007 Keith Packard + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * The Original Code is the cairo graphics library. + * + * The Initial Developer of the Original Code is Keith Packard + * + * Contributor(s): + * Keith Packard <keithp@keithp.com> + */ +#include "cairo-test.h" + +static cairo_test_draw_function_t draw; + +cairo_test_t test = { + "miter-precision", + "test how cairo deals with small miters" + "\ncurrent code draws inappropriate bevels at times", + 120, 100, + draw +}; + +static cairo_test_status_t +draw (cairo_t *cr, int width, int height) +{ + double xscale, yscale; + cairo_set_source_rgb (cr, 1, 1, 1); + cairo_paint (cr); + + cairo_set_source_rgb (cr, 0, 0, 0); + cairo_set_miter_limit (cr, 100000); + for (xscale = 1; xscale <= 1000; xscale += 999) + for (yscale = 1; yscale <= 1000; yscale += 999) + { + double max_scale = xscale > yscale ? xscale : yscale; + cairo_save (cr); + if (xscale > 1) + cairo_translate (cr, 50, 0); + if (yscale > 1) + cairo_translate (cr, 0, 50); + cairo_scale (cr, xscale, yscale); + cairo_set_line_width (cr, 10.0 / max_scale); + cairo_move_to (cr, 10.0 / xscale, 10.0 / yscale); + cairo_line_to (cr, 40.0 / xscale, 10.0 / yscale); + cairo_line_to (cr, 10.0 / xscale, 30.0 / yscale); + cairo_stroke (cr); + cairo_restore (cr); + } + + return CAIRO_TEST_SUCCESS; +} + +int +main (void) +{ + return cairo_test (&test); +} diff --git a/test/new-sub-path-ps-rgb24-ref.png b/test/new-sub-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..bceb5b7 --- /dev/null +++ b/test/new-sub-path-ps-rgb24-ref.png diff --git a/test/operator-clear.c b/test/operator-clear.c index d076047..e6cb042 100644 --- a/test/operator-clear.c +++ b/test/operator-clear.c @@ -61,7 +61,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/operator-source-ps-argb32-ref.png b/test/operator-source-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..dda5e66 --- /dev/null +++ b/test/operator-source-ps-argb32-ref.png diff --git a/test/operator-source-ps-rgb24-ref.png b/test/operator-source-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..3137b15 --- /dev/null +++ b/test/operator-source-ps-rgb24-ref.png diff --git a/test/operator-source.c b/test/operator-source.c index 4224c15..e63bcea 100644 --- a/test/operator-source.c +++ b/test/operator-source.c @@ -67,7 +67,7 @@ set_surface_pattern (cairo_t *cr, int x, int y) x += 0.2 * WIDTH; y += 0.2 * HEIGHT; - source_surface = cairo_surface_create_similar (cairo_get_target (cr), + source_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, width, height); cr2 = cairo_create (source_surface); @@ -98,7 +98,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/pdiff/Makefile.in b/test/pdiff/Makefile.in index c011515..bfbde4c 100644 --- a/test/pdiff/Makefile.in +++ b/test/pdiff/Makefile.in @@ -97,6 +97,8 @@ CAIRO_CAN_TEST_PS_SURFACE_FALSE = @CAIRO_CAN_TEST_PS_SURFACE_FALSE@ CAIRO_CAN_TEST_PS_SURFACE_TRUE = @CAIRO_CAN_TEST_PS_SURFACE_TRUE@ CAIRO_CAN_TEST_SVG_SURFACE_FALSE = @CAIRO_CAN_TEST_SVG_SURFACE_FALSE@ CAIRO_CAN_TEST_SVG_SURFACE_TRUE = @CAIRO_CAN_TEST_SVG_SURFACE_TRUE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_FALSE@ +CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE = @CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE_TRUE@ CAIRO_CFLAGS = @CAIRO_CFLAGS@ CAIRO_HAS_ATSUI_FONT_FALSE = @CAIRO_HAS_ATSUI_FONT_FALSE@ CAIRO_HAS_ATSUI_FONT_TRUE = @CAIRO_HAS_ATSUI_FONT_TRUE@ diff --git a/test/pdiff/pdiff.c b/test/pdiff/pdiff.c index 4f3226d..3f472f3 100644 --- a/test/pdiff/pdiff.c +++ b/test/pdiff/pdiff.c @@ -257,19 +257,19 @@ pdiff_compare (cairo_surface_t *surface_a, unsigned int i; /* assuming colorspaces are in Adobe RGB (1998) convert to XYZ */ - float *aX = xmalloc (dim * sizeof (float)); - float *aY = xmalloc (dim * sizeof (float)); - float *aZ = xmalloc (dim * sizeof (float)); - float *bX = xmalloc (dim * sizeof (float)); - float *bY = xmalloc (dim * sizeof (float)); - float *bZ = xmalloc (dim * sizeof (float)); - float *aLum = xmalloc (dim * sizeof (float)); - float *bLum = xmalloc (dim * sizeof (float)); - - float *aA = xmalloc (dim * sizeof (float)); - float *bA = xmalloc (dim * sizeof (float)); - float *aB = xmalloc (dim * sizeof (float)); - float *bB = xmalloc (dim * sizeof (float)); + float *aX; + float *aY; + float *aZ; + float *bX; + float *bY; + float *bZ; + float *aLum; + float *bLum; + + float *aA; + float *bA; + float *aB; + float *bB; unsigned int x, y, w, h; @@ -289,6 +289,20 @@ pdiff_compare (cairo_surface_t *surface_a, if (w < 3 || h < 3) /* too small for the Laplacian convolution */ return -1; + aX = xmalloc (dim * sizeof (float)); + aY = xmalloc (dim * sizeof (float)); + aZ = xmalloc (dim * sizeof (float)); + bX = xmalloc (dim * sizeof (float)); + bY = xmalloc (dim * sizeof (float)); + bZ = xmalloc (dim * sizeof (float)); + aLum = xmalloc (dim * sizeof (float)); + bLum = xmalloc (dim * sizeof (float)); + + aA = xmalloc (dim * sizeof (float)); + bA = xmalloc (dim * sizeof (float)); + aB = xmalloc (dim * sizeof (float)); + bB = xmalloc (dim * sizeof (float)); + for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { float r, g, b, l; diff --git a/test/pixman-rotate-ps-argb32-ref.png b/test/pixman-rotate-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..1d6ad04 --- /dev/null +++ b/test/pixman-rotate-ps-argb32-ref.png diff --git a/test/pixman-rotate-ps-rgb24-ref.png b/test/pixman-rotate-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..d8ecce9 --- /dev/null +++ b/test/pixman-rotate-ps-rgb24-ref.png diff --git a/test/pixman-rotate.c b/test/pixman-rotate.c index 118b82e..4d8e300 100644 --- a/test/pixman-rotate.c +++ b/test/pixman-rotate.c @@ -55,7 +55,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *stamp; cairo_t *cr2; - stamp = cairo_surface_create_similar (cairo_get_target (cr), + stamp = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, WIDTH, HEIGHT); cr2 = cairo_create (stamp); diff --git a/test/random-intersections-ps-rgb24-ref.png b/test/random-intersections-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..2a199ff --- /dev/null +++ b/test/random-intersections-ps-rgb24-ref.png diff --git a/test/rel-path-ps-rgb24-ref.png b/test/rel-path-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..ccdcebb --- /dev/null +++ b/test/rel-path-ps-rgb24-ref.png diff --git a/test/rel-path.c b/test/rel-path.c index 1da3557..0f42321 100644 --- a/test/rel-path.c +++ b/test/rel-path.c @@ -33,9 +33,75 @@ cairo_test_t test = { draw }; +static cairo_status_t +invalid_rel_move_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_move_to (cr, SIZE, SIZE/2); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + +static cairo_status_t +invalid_rel_line_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_line_to (cr, -SIZE, SIZE/2); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + +static cairo_status_t +invalid_rel_curve_to (cairo_surface_t *target) +{ + cairo_t *cr; + cairo_status_t status; + + cr = cairo_create (target); + cairo_rel_curve_to (cr, + SIZE/2, -SIZE/2, + SIZE*2/3, -SIZE/3, + SIZE/2, -SIZE); + status = cairo_status (cr); + cairo_destroy (cr); + + return status; +} + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { + cairo_status_t status; + + /* first test that a relative move without a current point fails... */ + status = invalid_rel_move_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_move_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + + status = invalid_rel_line_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_line_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + + status = invalid_rel_curve_to (cairo_get_target (cr)); + if (status != CAIRO_STATUS_NO_CURRENT_POINT) { + cairo_test_log ("Error: invalid cairo_rel_curve_to() did not raise NO_CURRENT_POINT\n"); + return CAIRO_TEST_FAILURE; + } + cairo_set_source_rgb (cr, 1, 1, 1); cairo_move_to (cr, 0, 0); cairo_rel_move_to (cr, SIZE, SIZE/2); diff --git a/test/rotate-image-surface-paint-ps-rgb24-ref.png b/test/rotate-image-surface-paint-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..4ddcfae --- /dev/null +++ b/test/rotate-image-surface-paint-ps-rgb24-ref.png diff --git a/test/self-copy.c b/test/self-copy.c index 0c23855..63e1897 100644 --- a/test/self-copy.c +++ b/test/self-copy.c @@ -58,7 +58,7 @@ draw (cairo_t *cr, int width, int height) /* Create a pattern with the target surface as the source, * offset by SIZE/2 */ - pattern = cairo_pattern_create_for_surface (cairo_get_target (cr)); + pattern = cairo_pattern_create_for_surface (cairo_get_group_target (cr)); cairo_matrix_init_translate (&matrix, - SIZE / 2, - SIZE / 2); cairo_pattern_set_matrix (pattern, &matrix); diff --git a/test/solid-pattern-cache-stress.c b/test/solid-pattern-cache-stress.c index 93e2f69..957b204 100644 --- a/test/solid-pattern-cache-stress.c +++ b/test/solid-pattern-cache-stress.c @@ -1,12 +1,12 @@ /* - * Copyright ? 2007 Chris Wilson. + * Copyright © 2007 Chris Wilson. * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without * fee, provided that the above copyright notice appear in all copies * and that both that copyright notice and this permission notice * appear in supporting documentation, and that the name of - * Chris Wilson. not be used in advertising or publicity pertaining to + * Chris Wilson. Not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Chris Wilson makes no representations about the * suitability of this software for any purpose. It is provided "as @@ -23,6 +23,10 @@ * Author: Chris Wilson <chris at chris-wilson.co.uk> */ +#if HAVE_CONFIG_H +#include "config.h" +#endif + #include "cairo-test.h" static cairo_test_draw_function_t draw; @@ -39,6 +43,10 @@ cairo_test_t test = { #define LOOPS 10 #define NRAND 100 +#ifndef HAVE_DRAND48 +#define drand48() (rand () / (double) RAND_MAX) +#endif + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { diff --git a/test/source-clip-scale-ps-argb32-ref.png b/test/source-clip-scale-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..be57d77 --- /dev/null +++ b/test/source-clip-scale-ps-argb32-ref.png diff --git a/test/source-clip-scale-ps-rgb24-ref.png b/test/source-clip-scale-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..be57d77 --- /dev/null +++ b/test/source-clip-scale-ps-rgb24-ref.png diff --git a/test/source-clip-scale.c b/test/source-clip-scale.c index cc24969..26684d3 100644 --- a/test/source-clip-scale.c +++ b/test/source-clip-scale.c @@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *source; cairo_t *cr2; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, SIZE, SIZE); cr2 = cairo_create (source); diff --git a/test/source-clip.c b/test/source-clip.c index cb9386a..46eb233 100644 --- a/test/source-clip.c +++ b/test/source-clip.c @@ -44,7 +44,7 @@ draw (cairo_t *cr, int width, int height) cairo_surface_t *source; cairo_t *cr2; - source = cairo_surface_create_similar (cairo_get_target (cr), + source = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_COLOR_ALPHA, SIZE, SIZE); diff --git a/test/surface-pattern-big-scale-down-ref.png b/test/surface-pattern-big-scale-down-ref.png Binary files differnew file mode 100644 index 0000000..7a8f513 --- /dev/null +++ b/test/surface-pattern-big-scale-down-ref.png diff --git a/test/surface-pattern-big-scale-down.c b/test/surface-pattern-big-scale-down.c index d1f818c..c938d99 100644 --- a/test/surface-pattern-big-scale-down.c +++ b/test/surface-pattern-big-scale-down.c @@ -81,7 +81,6 @@ draw (cairo_t *cr, int width, int height) { cairo_surface_t *surface; cairo_pattern_t *pat; - int n; cairo_set_source_rgb (cr, 0, 0, 0); cairo_paint (cr); @@ -90,6 +89,7 @@ draw (cairo_t *cr, int width, int height) setup_source_surface (surface, SRC_WIDTH, SRC_HEIGHT); pat = cairo_pattern_create_for_surface (surface); + cairo_surface_destroy (surface); /* We want to draw at a position such that n * SRC_WIDTH * (SRC_WIDTH/16.0) > 32768. * x = n * 16. @@ -107,10 +107,15 @@ draw (cairo_t *cr, int width, int height) /* n = 17 */ draw_n (cr, pat, 16.0, 17); #else - for (n = 0; n < 32; n++) - draw_n (cr, pat, 16.0, n); + { + int n; + for (n = 0; n < 32; n++) + draw_n (cr, pat, 16.0, n); + } #endif + cairo_pattern_destroy (pat); + return CAIRO_TEST_SUCCESS; } diff --git a/test/svg-clip.c b/test/svg-clip.c index 81af104..77ae9e9 100644 --- a/test/svg-clip.c +++ b/test/svg-clip.c @@ -76,7 +76,7 @@ test_clip (cairo_t *cr, double width, double height) /* Create a new context for this surface to test overlapped * drawing from two contexts */ - cr2 = cairo_create (cairo_get_target (cr)); + cr2 = cairo_create (cairo_get_group_target (cr)); /* Using the new context, draw a black vertical line, which should * appear unclipped on top of everything drawn so far. */ @@ -127,7 +127,7 @@ main (void) cairo_destroy (cr); cairo_surface_destroy (surface); - printf ("svg-surface: Please check %s to make sure it looks happy.\n", + printf ("svg-clip: Please check %s to make sure it looks happy.\n", filename); cairo_test_fini (); diff --git a/test/text-pattern-ps-argb32-ref.png b/test/text-pattern-ps-argb32-ref.png Binary files differnew file mode 100644 index 0000000..fa887f9 --- /dev/null +++ b/test/text-pattern-ps-argb32-ref.png diff --git a/test/text-pattern-ps-rgb24-ref.png b/test/text-pattern-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..2412bcb --- /dev/null +++ b/test/text-pattern-ps-rgb24-ref.png diff --git a/test/text-rotate-ps-rgb24-ref.png b/test/text-rotate-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..3c6759e --- /dev/null +++ b/test/text-rotate-ps-rgb24-ref.png diff --git a/test/text-zero-len.c b/test/text-zero-len.c index 57c36fd..e64daa8 100644 --- a/test/text-zero-len.c +++ b/test/text-zero-len.c @@ -54,10 +54,22 @@ cairo_test_t test = { draw }; -/* Draw the word cairo at NUM_TEXT different angles */ +static cairo_bool_t +text_extents_equal (const cairo_text_extents_t *A, + const cairo_text_extents_t *B) +{ + return A->x_bearing == B->x_bearing && + A->y_bearing == B->y_bearing && + A->width == B->width && + A->height == B->height && + A->x_advance == B->x_advance && + A->y_advance == B->y_advance; +} + static cairo_test_status_t draw (cairo_t *cr, int width, int height) { + cairo_text_extents_t nil_extents; cairo_text_extents_t extents; cairo_select_font_face (cr, "Bitstream Vera Sans", @@ -66,17 +78,48 @@ draw (cairo_t *cr, int width, int height) cairo_set_font_size (cr, 16); cairo_move_to (cr, 10, 25); + cairo_show_text (cr, NULL); cairo_show_text (cr, ""); cairo_show_glyphs (cr, NULL, 0); cairo_show_glyphs (cr, (void*)8, 0); cairo_move_to (cr, 10, 55); + cairo_text_path (cr, NULL); cairo_text_path (cr, ""); cairo_glyph_path (cr, (void*)8, 0); cairo_fill (cr); + memset (&nil_extents, 0, sizeof (cairo_text_extents_t)); + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); cairo_text_extents (cr, "", &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_text_extents(\"\"); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); + cairo_text_extents (cr, NULL, &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_text_extents(NULL); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } + + memset (&extents, 0xff, sizeof (cairo_text_extents_t)); cairo_glyph_extents (cr, (void*)8, 0, &extents); + if (! text_extents_equal (&extents, &nil_extents)) { + cairo_test_log ("Error: cairo_glyph_extents(); extents (%g, %g, %g, %g, %g, %g)\n", + extents.x_bearing, extents.y_bearing, + extents.width, extents.height, + extents.x_advance, extents.y_advance); + return CAIRO_TEST_FAILURE; + } return CAIRO_TEST_SUCCESS; } diff --git a/test/trap-clip-ps-rgb24-ref.png b/test/trap-clip-ps-rgb24-ref.png Binary files differnew file mode 100644 index 0000000..5bff374 --- /dev/null +++ b/test/trap-clip-ps-rgb24-ref.png diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c index e04ec80..06f5cb1 100644 --- a/test/unbounded-operator.c +++ b/test/unbounded-operator.c @@ -43,7 +43,7 @@ draw_mask (cairo_t *cr, int x, int y) x += 0.05 * WIDTH; y += 0.05 * HEIGHT; - mask_surface = cairo_surface_create_similar (cairo_get_target (cr), + mask_surface = cairo_surface_create_similar (cairo_get_group_target (cr), CAIRO_CONTENT_ALPHA, width, height); cr2 = cairo_create (mask_surface); diff --git a/test/xlib-surface.c b/test/xlib-surface.c index a1578cd..d958349 100644 --- a/test/xlib-surface.c +++ b/test/xlib-surface.c @@ -28,7 +28,6 @@ #include "cairo.h" #include "cairo-xlib.h" -#include "cairo-xlib-xrender.h" #include "cairo-test.h" #include "cairo-boilerplate-xlib.h" |