mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 13:05:32 +09:00
chore(repo): remove dead code and useless tests (#3375)
This commit is contained in:
1 parent
7e177a1c90
commit
1cd62eb661
1391 files changed
+783
-120415
No files matched your search
@@ -1041,33 +1041,6 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn urgency_strings_match_freedesktop_bytes() {
|
||||
assert_eq!(Urgency::parse("low").map(Urgency::as_byte), Some(0));
|
||||
assert_eq!(Urgency::parse("normal").map(Urgency::as_byte), Some(1));
|
||||
assert_eq!(Urgency::parse("critical").map(Urgency::as_byte), Some(2));
|
||||
assert_eq!(Urgency::parse("unknown"), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_notify_args_match_legacy_defaults() {
|
||||
let args = NotifyArgs {
|
||||
app_name: String::new(),
|
||||
replaces_id: 0,
|
||||
app_icon: String::new(),
|
||||
summary: String::new(),
|
||||
body: String::new(),
|
||||
actions: Vec::new(),
|
||||
hints: NotifyHints::empty(),
|
||||
expire_timeout_ms: -1,
|
||||
};
|
||||
|
||||
assert_eq!(args.replaces_id, 0);
|
||||
assert_eq!(args.expire_timeout_ms, -1);
|
||||
assert!(flatten_actions(&args.actions).is_empty());
|
||||
assert!(build_hints(&args.hints).is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hints_use_freedesktop_variant_signatures() {
|
||||
let hints = NotifyHints {
|
||||
@@ -1104,41 +1077,6 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dbus_session_detected_via_bus_address() {
|
||||
assert!(has_dbus_session_from(
|
||||
Some("unix:path=/run/user/1000/bus"),
|
||||
None,
|
||||
|_| false
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dbus_session_detected_via_runtime_dir_socket() {
|
||||
assert!(has_dbus_session_from(
|
||||
None,
|
||||
Some("/run/user/1000"),
|
||||
|path| path == "/run/user/1000/bus"
|
||||
));
|
||||
assert!(has_dbus_session_from(
|
||||
None,
|
||||
Some("/run/user/1000/"),
|
||||
|path| path == "/run/user/1000/bus"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dbus_session_absent_in_headless_container() {
|
||||
assert!(!has_dbus_session_from(None, None, |_| false));
|
||||
assert!(!has_dbus_session_from(Some(""), Some(""), |_| true));
|
||||
assert!(!has_dbus_session_from(None, Some("/tmp/xdg"), |_| false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dbus_session_unreachable_marker_is_stable_for_renderer_matching() {
|
||||
assert!(DBUS_SESSION_UNREACHABLE.starts_with("DBus session bus unreachable"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn image_rowstride_defaults_to_width_times_channels() {
|
||||
let width = 3;
|
||||
|
||||
Reference in new issue
Block a user