blob: 374ec718102629e5975141d6819608e9464a97b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From 9acfacb5a5f6feccc3007371876c0b4fce6b3cde Mon Sep 17 00:00:00 2001
From: Randy Barlow <randy@electronsweatshop.com>
Date: Sat, 18 Sep 2021 13:26:20 -0400
Subject: [PATCH] Feature gate test_default_battery_movement
test_default_battery_movement() is now feature gated on the
battery feature.
fixes #581
Signed-off-by: Randy Barlow <randy@electronsweatshop.com>
---
tests/layout_management_tests.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/layout_management_tests.rs b/tests/layout_management_tests.rs
index 4b4f7a9..3c341d0 100644
--- a/tests/layout_management_tests.rs
+++ b/tests/layout_management_tests.rs
@@ -1,7 +1,9 @@
//! Mocks layout management, so we can check if we broke anything.
use bottom::app::layout_manager::{BottomLayout, BottomWidgetType};
-use bottom::constants::{DEFAULT_BATTERY_LAYOUT, DEFAULT_LAYOUT, DEFAULT_WIDGET_ID};
+#[cfg(feature = "battery")]
+use bottom::constants::DEFAULT_BATTERY_LAYOUT;
+use bottom::constants::{DEFAULT_LAYOUT, DEFAULT_WIDGET_ID};
use bottom::options::{layout_options::Row, Config};
use bottom::utils::error;
@@ -126,6 +128,7 @@ fn test_default_movement() {
);
}
+#[cfg(feature = "battery")]
#[test]
/// Tests battery movement in the default setup.
fn test_default_battery_movement() {
--
2.31.1
|