aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-27 09:58:22 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commit27911431dbfb8ad5e17ea295a9ae69847577260f (patch)
tree857498ed906f524848426cc6afabeea211be65e5 /src/tests
parentdb6447ed797fc5aa113d49e0da3130abcf58d2cf (diff)
downloadniri-27911431dbfb8ad5e17ea295a9ae69847577260f.tar.gz
niri-27911431dbfb8ad5e17ea295a9ae69847577260f.tar.bz2
niri-27911431dbfb8ad5e17ea295a9ae69847577260f.zip
tests: Rename DefaultWidth to DefaultSize
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/window_opening.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tests/window_opening.rs b/src/tests/window_opening.rs
index 57245152..d4091f08 100644
--- a/src/tests/window_opening.rs
+++ b/src/tests/window_opening.rs
@@ -133,18 +133,18 @@ impl fmt::Display for SetParent {
}
#[derive(Clone, Copy)]
-enum DefaultWidth {
+enum DefaultSize {
WindowChooses,
Proportion(&'static str),
Fixed(&'static str),
}
-impl fmt::Display for DefaultWidth {
+impl fmt::Display for DefaultSize {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
- DefaultWidth::WindowChooses => write!(f, "U"),
- DefaultWidth::Proportion(prop) => write!(f, "P{prop}"),
- DefaultWidth::Fixed(fixed) => write!(f, "F{fixed}"),
+ DefaultSize::WindowChooses => write!(f, "U"),
+ DefaultSize::Proportion(prop) => write!(f, "P{prop}"),
+ DefaultSize::Fixed(fixed) => write!(f, "F{fixed}"),
}
}
}
@@ -397,9 +397,9 @@ fn target_size() {
let open_floating = [None, Some("true")];
let default_column_width = [
None,
- Some(DefaultWidth::WindowChooses),
- Some(DefaultWidth::Proportion("0.25")),
- Some(DefaultWidth::Fixed("1000")),
+ Some(DefaultSize::WindowChooses),
+ Some(DefaultSize::Proportion("0.25")),
+ Some(DefaultSize::Fixed("1000")),
];
let border = [false, true];
@@ -430,7 +430,7 @@ fn check_target_size(
want_fullscreen: WantFullscreen,
open_maximized: Option<&str>,
open_floating: Option<&str>,
- default_width: Option<DefaultWidth>,
+ default_width: Option<DefaultSize>,
border: bool,
) {
let mut snapshot_desc = Vec::new();
@@ -465,9 +465,9 @@ window-rule {
if let Some(x) = default_width {
let value = match x {
- DefaultWidth::WindowChooses => String::new(),
- DefaultWidth::Proportion(prop) => format!("proportion {prop};"),
- DefaultWidth::Fixed(fixed) => format!("fixed {fixed};"),
+ DefaultSize::WindowChooses => String::new(),
+ DefaultSize::Proportion(prop) => format!("proportion {prop};"),
+ DefaultSize::Fixed(fixed) => format!("fixed {fixed};"),
};
writeln!(config, " default-column-width {{ {value} }}").unwrap();