[librsvg: 14/45] Session.new_for_test_suite(): New method
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 14/45] Session.new_for_test_suite(): New method
- Date: Wed, 24 Aug 2022 01:56:38 +0000 (UTC)
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]