[gtk/matthiasc/lottie2: 1/2] testsuite: Add more random paths




commit 7613599eb5fa8abd90bc8c4d010193396062b92d
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.

 testsuite/gsk/path.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/testsuite/gsk/path.c b/testsuite/gsk/path.c
index 09f3ca0347..a563a53414 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, 14))
       {
         case 0:
           gsk_path_builder_move_to (builder,
@@ -65,6 +65,7 @@ create_random_path (void)
           break;
 
         case 10:
+        case 11:
           gsk_path_builder_add_rect (builder,
                                      g_test_rand_double_range (-1000, 1000),
                                      g_test_rand_double_range (-1000, 1000),
@@ -72,6 +73,15 @@ create_random_path (void)
                                      g_test_rand_double_range (-1000, 1000));
           break;
 
+        case 12:
+        case 13:
+          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;
+
         default:
           g_assert_not_reached();
           break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]