Adapt tests to new path builder behavior

Some tests were expecting to get elevated curves
from GskPathBuilder. But they won't, anymore.
This commit is contained in:
Matthias Clasen 2023-09-17 08:27:02 -04:00
parent 7e13cfea91
commit ecfc661054
3 changed files with 16 additions and 3 deletions

View File

@ -1,4 +1,4 @@
fill {
path: "M 0 0 O 10 10 20 20 5";
path: "M 0 0 O 10 0 20 20 5";
fill-rule: even-odd;
}

View File

@ -4,6 +4,6 @@ fill {
color: rgb(255,0,204);
}
path: "\
M 0 0 O 10 10, 20 20, 5";
M 0 0 O 10 0, 20 20, 5";
fill-rule: even-odd;
}

View File

@ -426,10 +426,23 @@ test_foreach (void)
path2 = gsk_path_builder_free_to_path (builder);
s2 = gsk_path_to_string (path2);
g_assert_cmpstr (sp, ==, s2);
/* We still end up with quads here, since GskPathBuilder aggressively reduces
* curves degrees.
*/
g_assert_cmpstr (s, ==, s2);
gsk_path_unref (path2);
g_free (s2);
path2 = gsk_path_parse (sp);
s2 = gsk_path_to_string (path2);
g_assert_cmpstr (s, ==, s2);
gsk_path_unref (path2);
g_free (s2);
gsk_path_unref (path);
}
static void