Remove redeundant -rgb24-ref.png images.
In several cases the -rgb24 reference images were identical to the -ref images. So we change the logic to find the latter if the former doesn't exist, and then we remove the redundant images.
|
Before Width: | Height: | Size: 128 B |
|
|
@ -85,7 +85,7 @@ static const char *fail_face = "", *normal_face = "";
|
|||
/* Static data is messy, but we're coding for tests here, not a
|
||||
* general-purpose library, and it keeps the tests cleaner to avoid a
|
||||
* context object there, (though not a whole lot). */
|
||||
FILE *cairo_test_log_file;
|
||||
FILE *cairo_test_log_file = NULL;
|
||||
|
||||
void
|
||||
cairo_test_init (const char *test_name)
|
||||
|
|
@ -107,9 +107,10 @@ void
|
|||
cairo_test_log (const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
FILE *file = cairo_test_log_file ? cairo_test_log_file : stderr;
|
||||
|
||||
va_start (va, fmt);
|
||||
vfprintf (cairo_test_log_file, fmt, va);
|
||||
vfprintf (file, fmt, va);
|
||||
va_end (va);
|
||||
}
|
||||
|
||||
|
|
@ -1422,6 +1423,7 @@ cairo_test_for_target (cairo_test_t *test,
|
|||
srcdir = ".";
|
||||
format = _cairo_test_content_name (target->content);
|
||||
|
||||
/* First look for a target/format-specific reference image. */
|
||||
xasprintf (&png_name, "%s-%s-%s%s", test->name,
|
||||
target->name, format, CAIRO_TEST_PNG_SUFFIX);
|
||||
xasprintf (&ref_name, "%s/%s-%s-%s%s", srcdir, test->name,
|
||||
|
|
@ -1429,13 +1431,17 @@ cairo_test_for_target (cairo_test_t *test,
|
|||
if (access (ref_name, F_OK) != 0) {
|
||||
free (ref_name);
|
||||
|
||||
if (target->content == CAIRO_CONTENT_COLOR_ALPHA ||
|
||||
target->content == CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED)
|
||||
/* Next, look for format-specifc reference image. */
|
||||
xasprintf (&ref_name, "%s/%s-%s%s", srcdir, test->name,
|
||||
format,CAIRO_TEST_REF_SUFFIX);
|
||||
|
||||
if (access (ref_name, F_OK) != 0) {
|
||||
free (ref_name);
|
||||
|
||||
/* Finally, look for the standard reference image. */
|
||||
xasprintf (&ref_name, "%s/%s%s", srcdir, test->name,
|
||||
CAIRO_TEST_REF_SUFFIX);
|
||||
else
|
||||
xasprintf (&ref_name, "%s/%s-%s%s", srcdir, test->name,
|
||||
format,CAIRO_TEST_REF_SUFFIX);
|
||||
}
|
||||
}
|
||||
xasprintf (&diff_name, "%s-%s-%s%s", test->name,
|
||||
target->name, format, CAIRO_TEST_DIFF_SUFFIX);
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 186 B |
|
Before Width: | Height: | Size: 114 B |
|
Before Width: | Height: | Size: 353 B |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 254 B |
|
|
@ -34,6 +34,7 @@
|
|||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
read_png_status_t status;
|
||||
unsigned char *buffer_a;
|
||||
unsigned int width_a, height_a, stride_a;
|
||||
unsigned char *buffer_b;
|
||||
|
|
@ -51,8 +52,13 @@ main (int argc, char *argv[])
|
|||
exit (1);
|
||||
}
|
||||
|
||||
read_png_argb32 (argv[1], &buffer_a, &width_a, &height_a, &stride_a);
|
||||
read_png_argb32 (argv[2], &buffer_b, &width_b, &height_b, &stride_b);
|
||||
status = read_png_argb32 (argv[1], &buffer_a, &width_a, &height_a, &stride_a);
|
||||
if (status)
|
||||
return 1;
|
||||
|
||||
status = read_png_argb32 (argv[2], &buffer_b, &width_b, &height_b, &stride_b);
|
||||
if (status)
|
||||
return 1;
|
||||
|
||||
if ((width_a == width_b) && (height_a == height_b) && (stride_a == stride_b))
|
||||
{
|
||||
|
|
@ -77,8 +83,5 @@ main (int argc, char *argv[])
|
|||
|
||||
free (buffer);
|
||||
|
||||
return total_pixels_changed;
|
||||
return (total_pixels_changed != 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 199 B |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 116 B |
|
Before Width: | Height: | Size: 248 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 523 B |
|
Before Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 291 B |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 194 B |
|
Before Width: | Height: | Size: 995 B |
|
Before Width: | Height: | Size: 284 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 318 B |
|
Before Width: | Height: | Size: 115 B |
|
Before Width: | Height: | Size: 4.3 KiB |