[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70093: *** SPAM *** bug#70093: Remove unnecessary `image-tests--map-
From: |
David Ponce |
Subject: |
bug#70093: *** SPAM *** bug#70093: Remove unnecessary `image-tests--map-equal' |
Date: |
Sat, 30 Mar 2024 23:04:28 +0100 |
User-agent: |
Mozilla Thunderbird |
On 30/03/2024 20:44, Joseph Turner wrote:
With the resolution of bug#69992, it may be possible to remove the
`image-tests--map-equal' equality predicate from lisp/image-tests.el.
Eli and David, would you please apply the attached patch and then run
the tests to see if we still need to allow for tolerances in
`image--compute-map-and-original-map'?
The tests pass for me, but then again, they never failed on my machine...
Thank you!! I'm grateful for this fun collaboration. :)
Joseph
Hi Joseph,
Did you forget to attach the patch? I cannot find it.
Anyway, I don't think the resolution of bug#69992 changed anything
regarding the test `image--compute-map-and-original-map'. And to
be honest I don't understand why it gives a different result on our
configurations.
To test, I also eval the following simple code in *scratch* buffer,
which gives me consistent results on my laptop:
(let* ((svg (svg-create 200 100))
(omap `(((rect . ((0 . 0) . (50 . 50)))
rect-test (help-echo "rect-test"))
((circle . ((85 . 55) . 25))
circle-test (help-echo "circle-test"))
((poly . [100 0 125 0 170 50 125 50])
poly-test (help-echo "poly-test")))))
(svg-rectangle svg 0 0 50 50
:stroke-width 0 :fill "red")
(svg-circle svg 85 55 25
:stroke-width 0 :fill "green")
(svg-polyline svg '((100 . 0) (125 . 0) (170 . 50) (125 . 50))
:stroke-width 0 :fill "blue")
(let ((image (svg-image svg
:original-map omap
:scale nil ;; vary scale test
:rotation nil ;; vary rotation test
:flip nil ;; vary flip test
)))
;; Must see the pointer and help-echo change when mouse hovers the
;; rect, circle and poly hot spots.
(insert-image image)
(insert ?\n)
;; Must see the same original map.
(image--compute-original-map image)))
Thanks!