[librsvg/rustification] marker.rs: In tests, use the global helper functions; don't duplicate them



commit 646d565ad0e9a4d584dea6573b250b3567230aeb
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Oct 26 21:05:50 2016 -0500

    marker.rs: In tests, use the global helper functions; don't duplicate them

 rust/src/marker.rs |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/rust/src/marker.rs b/rust/src/marker.rs
index 2703071..7756097 100644
--- a/rust/src/marker.rs
+++ b/rust/src/marker.rs
@@ -199,17 +199,15 @@ mod tests {
     }
 
     fn degenerate (x: f64, y: f64) -> Segment {
-        Segment::Degenerate { x: x, y: y }
+        super::make_degenerate (x, y)
     }
 
-    fn curve (x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, x4: f64, y4: f64) -> Segment {
-        Segment::LineOrCurve {
-            x1: x1, y1: y1, x2: x2, y2: y2, x3: x3, y3: y3, x4: x4, y4: y4
-        }
+    fn line (x1: f64, y1: f64, x2: f64, y2: f64) -> Segment {
+        super::make_line (x1, y1, x2, y2)
     }
 
-    fn line (x1: f64, y1: f64, x2: f64, y2: f64) -> Segment {
-        curve (x1, y1, x2, y2, x1, y1, x2, y2)
+    fn curve (x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, x4: f64, y4: f64) -> Segment {
+        super::make_curve (x1, y1, x2, y2, x3, y3, x4, y4)
     }
 
     fn test_path_to_segments (path: cairo::Path, expected_segments: Vec<Segment>) {


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