[librsvg/rustification] marker.rs: Comments to explain what each test does



commit f9c447f741c35cdb11d9ca600b618b887d001f0c
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 26 20:44:20 2016 -0500

    marker.rs: Comments to explain what each test does

 rust/src/marker.rs |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/rust/src/marker.rs b/rust/src/marker.rs
index fdb6494..4d78398 100644
--- a/rust/src/marker.rs
+++ b/rust/src/marker.rs
@@ -223,7 +223,7 @@ mod tests {
         assert_eq! (expected_segments, segments);
     }
 
-    /* Single open path */
+    /* Single open path; the easy case */
 
     fn setup_open_path () -> cairo::Path {
         let cr = create_cr ();
@@ -278,6 +278,8 @@ mod tests {
         test_path_to_segments (setup_multiple_open_subpaths (), expected_segments);
     }
 
+    /* Closed subpath; must have a line segment back to the first point */
+
     fn setup_closed_subpath () -> cairo::Path {
         let cr = create_cr ();
 
@@ -301,6 +303,10 @@ mod tests {
         test_path_to_segments (setup_closed_subpath (), expected_segments);
     }
 
+    /* Multiple closed subpaths; each must have a line segment back to their
+     * initial points, with no degenerate segments between subpaths.
+     */
+
     fn setup_multiple_closed_subpaths () -> cairo::Path {
         let cr = create_cr ();
 
@@ -335,6 +341,10 @@ mod tests {
         test_path_to_segments (setup_multiple_closed_subpaths (), expected_segments);
     }
 
+    /* A lineto follows the first closed subpath, with no moveto to start the second subpath.  The
+     * lineto must start at the first point of the first subpath.
+     */
+
     fn setup_no_moveto_after_closepath () -> cairo::Path {
         let cr = create_cr ();
 


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