tests: Rename DefaultWidth to DefaultSize
Browse files at this commit27911431dbfb8ad5e17ea295a9ae69847577260fParent: db6447e1 changed file +12 -12
- src/tests/window_opening.rs +12 -12
src/tests/window_opening.rsmodified+12 -12
| @@ -133,18 +133,18 @@ impl fmt::Display for SetParent { | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | #[derive(Clone, Copy)] | 135 | #[derive(Clone, Copy)] |
| 136 | -enum DefaultWidth { | 136 | +enum DefaultSize { |
| 137 | WindowChooses, | 137 | WindowChooses, |
| 138 | Proportion(&'static str), | 138 | Proportion(&'static str), |
| 139 | Fixed(&'static str), | 139 | Fixed(&'static str), |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | -impl fmt::Display for DefaultWidth { | 142 | +impl fmt::Display for DefaultSize { |
| 143 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | 143 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 144 | match self { | 144 | match self { |
| 145 | - DefaultWidth::WindowChooses => write!(f, "U"), | 145 | + DefaultSize::WindowChooses => write!(f, "U"), |
| 146 | - DefaultWidth::Proportion(prop) => write!(f, "P{prop}"), | 146 | + DefaultSize::Proportion(prop) => write!(f, "P{prop}"), |
| 147 | - DefaultWidth::Fixed(fixed) => write!(f, "F{fixed}"), | 147 | + DefaultSize::Fixed(fixed) => write!(f, "F{fixed}"), |
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| @@ -397,9 +397,9 @@ fn target_size() { | |||
| 397 | let open_floating = [None, Some("true")]; | 397 | let open_floating = [None, Some("true")]; |
| 398 | let default_column_width = [ | 398 | let default_column_width = [ |
| 399 | None, | 399 | None, |
| 400 | - Some(DefaultWidth::WindowChooses), | 400 | + Some(DefaultSize::WindowChooses), |
| 401 | - Some(DefaultWidth::Proportion("0.25")), | 401 | + Some(DefaultSize::Proportion("0.25")), |
| 402 | - Some(DefaultWidth::Fixed("1000")), | 402 | + Some(DefaultSize::Fixed("1000")), |
| 403 | ]; | 403 | ]; |
| 404 | let border = [false, true]; | 404 | let border = [false, true]; |
| 405 | 405 | ||
| @@ -430,7 +430,7 @@ fn check_target_size( | |||
| 430 | want_fullscreen: WantFullscreen, | 430 | want_fullscreen: WantFullscreen, |
| 431 | open_maximized: Option<&str>, | 431 | open_maximized: Option<&str>, |
| 432 | open_floating: Option<&str>, | 432 | open_floating: Option<&str>, |
| 433 | - default_width: Option<DefaultWidth>, | 433 | + default_width: Option<DefaultSize>, |
| 434 | border: bool, | 434 | border: bool, |
| 435 | ) { | 435 | ) { |
| 436 | let mut snapshot_desc = Vec::new(); | 436 | let mut snapshot_desc = Vec::new(); |
| @@ -465,9 +465,9 @@ window-rule { | |||
| 465 | 465 | ||
| 466 | if let Some(x) = default_width { | 466 | if let Some(x) = default_width { |
| 467 | let value = match x { | 467 | let value = match x { |
| 468 | - DefaultWidth::WindowChooses => String::new(), | 468 | + DefaultSize::WindowChooses => String::new(), |
| 469 | - DefaultWidth::Proportion(prop) => format!("proportion {prop};"), | 469 | + DefaultSize::Proportion(prop) => format!("proportion {prop};"), |
| 470 | - DefaultWidth::Fixed(fixed) => format!("fixed {fixed};"), | 470 | + DefaultSize::Fixed(fixed) => format!("fixed {fixed};"), |
| 471 | }; | 471 | }; |
| 472 | writeln!(config, " default-column-width {{ {value} }}").unwrap(); | 472 | writeln!(config, " default-column-width {{ {value} }}").unwrap(); |
| 473 | 473 | ||