[gtk/matthiasc/lottie2: 5/5] testsuite: Add more random paths
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/lottie2: 5/5] testsuite: Add more random paths
- Date: Wed, 25 Nov 2020 01:38:59 +0000 (UTC)
commit be1a87ba468b1a35ddbb70c05fd07454a9d70d84
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 24 20:37:43 2020 -0500
testsuite: Add more random paths
Make the random path generation include circles
and arcs.
testsuite/gsk/path.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/gsk/path.c b/testsuite/gsk/path.c
index f79d3b4d33..36847320fd 100644
--- a/testsuite/gsk/path.c
+++ b/testsuite/gsk/path.c
@@ -30,7 +30,7 @@ create_random_path (void)
for (i = 0; i < n; i++)
{
- switch (g_test_rand_int_range (0, 11))
+ switch (g_test_rand_int_range (0, 13))
{
case 0:
gsk_path_builder_move_to (builder,
@@ -72,6 +72,25 @@ create_random_path (void)
g_test_rand_double_range (-1000, 1000));
break;
+ case 11:
+ gsk_path_builder_add_circle (builder,
+ &GRAPHENE_POINT_INIT (
+ g_test_rand_double_range (-1000, 1000),
+ g_test_rand_double_range (-1000, 1000)),
+ g_test_rand_double_range (0, 1000));
+ break;
+
+ case 12:
+ gsk_path_builder_arc_to (builder,
+ g_test_rand_double_range (0, 1000),
+ g_test_rand_double_range (0, 1000),
+ g_test_rand_double_range (0, 2 * M_PI),
+ (gboolean)g_test_rand_int_range (0, 1),
+ (gboolean)g_test_rand_int_range (0, 1),
+ g_test_rand_double_range (-1000, 1000),
+ g_test_rand_double_range (-1000, 1000));
+ break;
+
default:
g_assert_not_reached();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]