1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Sat, 6 Sep 2025 15:26:07 +0200
Subject: Remove ispixelssimilar test
This test may fail depending of imagemagick version. Remove it
forwarded: not-needed
---
imagick-3.8.0/tests/024-ispixelsimilar.phpt | 57 -----------------------------
1 file changed, 57 deletions(-)
delete mode 100644 imagick-3.8.0/tests/024-ispixelsimilar.phpt
diff --git a/imagick-3.8.0/tests/024-ispixelsimilar.phpt b/imagick-3.8.0/tests/024-ispixelsimilar.phpt
deleted file mode 100644
index 443b3f1..0000000
--- a/imagick-3.8.0/tests/024-ispixelsimilar.phpt
+++ /dev/null
@@ -1,57 +0,0 @@
---TEST--
-Test ImagickPixel::isPixelSimilar
---SKIPIF--
-<?php require_once(dirname(__FILE__) . '/skipif.inc');
-
---FILE--
-<?php
-
-$root3 = 1.732050807568877;
-
-$tests = array(
- array ('rgb(245, 0, 0)', 'rgb(255, 0, 0)', 9 / $root3, false,),
- array ('rgb(245, 0, 0)', 'rgb(255, 0, 0)', 10 / $root3, true,),
- array ('rgb(0, 0, 0)', 'rgb(7, 7, 0)', 9 / $root3, false,),
- array ('rgb(0, 0, 0)', 'rgb(7, 7, 0)', 10 / $root3, true,),
- array ('rgba(0, 0, 0, 1)', 'rgba(7, 7, 0, 1)', 9 / $root3, false,),
- array ('rgba(0, 0, 0, 1)', 'rgba(7, 7, 0, 1)', 10 / $root3, true,),
- array ('rgb(128, 128, 128)', 'rgb(128, 128, 120)', 7 / $root3, false,),
- array ('rgb(128, 128, 128)', 'rgb(128, 128, 120)', 8 / $root3, true,),
-
- array ('rgb(0, 0, 0)', 'rgb(255, 255, 255)', 254.9, false,),
- array ('rgb(0, 0, 0)', 'rgb(255, 255, 255)', 255, true,),
- array ('rgb(255, 0, 0)', 'rgb(0, 255, 255)', 254.9, false,),
- array ('rgb(255, 0, 0)', 'rgb(0, 255, 255)', 255, true,),
- array ('black', 'rgba(0, 0, 0)', 0.0, true),
- array ('black', 'rgba(10, 0, 0, 1.0)', 10.0 / $root3, true),
-);
-
-try {
- foreach ($tests as $testInfo) {
- $color1 = $testInfo[0];
- $color2 = $testInfo[1];
- $distance = $testInfo[2];
- $expectation = $testInfo[3];
- $testDistance = ($distance / 255.0);
-
- $color1Pixel = new ImagickPixel($color1);
- $color2Pixel = new ImagickPixel($color2);
-
- $isSimilar = $color1Pixel->isPixelSimilarQuantum($color2Pixel, $testDistance * \Imagick::getquantum());
- if ($isSimilar !== $expectation) {
- echo "isSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL;
- }
-
- $isPixelSimilar = $color1Pixel->isPixelSimilar($color2Pixel, $testDistance);
- if ($isPixelSimilar !== $expectation) {
- echo "isPixelSimilar failed. Color [$color1] compared to color [$color2] distance $testDistance doesn't meet expected result [$expectation].". PHP_EOL;
- }
- }
- echo "success";
-} catch (\Exception $e) {
- echo "Exception caught in ImagickPixel::isPixelSimilar test: ".$e->getMessage() . PHP_EOL;
-}
-
-?>
---EXPECT--
-success
\ No newline at end of file
|