[librsvg/librsvg-2.52: 9/18] Read the geometry files




commit 847a3095f02b62912420710bc0347d2f485f8166
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri May 6 20:08:28 2022 -0500

    Read the geometry files
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/697>

 tests/src/geometries.rs | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
---
diff --git a/tests/src/geometries.rs b/tests/src/geometries.rs
index 409e25275..1ed3a8c68 100644
--- a/tests/src/geometries.rs
+++ b/tests/src/geometries.rs
@@ -48,3 +48,29 @@ fn read_geometries(path: &Path) -> Result<Geometries> {
     Ok(serde_json::from_str(&contents).context(format!("could not parse JSON from {:?}", path))?)
 }
 
+fn test(base_filename: &str) {
+    let mut geometries_filename = String::from(base_filename);
+    geometries_filename.push_str(".subs");
+
+    let geometries = read_geometries(Path::new(&geometries_filename)).expect("reading geometries JSON");
+}
+
+#[test]
+fn dual() {
+    test("tests/fixtures/geometries/dual.svg");
+}
+
+#[test]
+fn grid() {
+    test("tests/fixtures/geometries/grid.svg");
+}
+
+#[test]
+fn quad() {
+    test("tests/fixtures/geometries/quad.svg");
+}
+
+#[test]
+fn single() {
+    test("tests/fixtures/geometries/single.svg");
+}


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