[librsvg: 14/45] Session.new_for_test_suite(): New method




commit eb1f7381f3ac1ac12ca532243607797a384cf3ee
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Aug 22 15:31:02 2022 -0500

    Session.new_for_test_suite(): New method
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/731>

 src/session.rs | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/session.rs b/src/session.rs
index e363e8e7f..d8e2f9bda 100644
--- a/src/session.rs
+++ b/src/session.rs
@@ -27,6 +27,15 @@ impl Session {
         }
     }
 
+    #[cfg(test)]
+    pub fn new_for_test_suite() -> Self {
+        Self {
+            inner: Arc::new(SessionInner {
+                log_enabled: false,
+            }),
+        }
+    }
+
     pub fn log_enabled(&self) -> bool {
         self.inner.log_enabled
     }


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