1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-24 22:01:47 +03:00

termwiz: add test to track size_of Action

no functional change
This commit is contained in:
Wez Furlong 2022-09-09 21:03:19 -07:00
parent 9bcc4e0bbc
commit 7a0461989e

View File

@ -45,6 +45,16 @@ pub enum Action {
KittyImage(KittyImage),
}
#[cfg(all(test, target_pointer_width = "64"))]
#[test]
fn action_size() {
assert_eq!(std::mem::size_of::<Action>(), 184);
assert_eq!(std::mem::size_of::<DeviceControlMode>(), 16);
assert_eq!(std::mem::size_of::<ControlCode>(), 1);
assert_eq!(std::mem::size_of::<CSI>(), 48);
assert_eq!(std::mem::size_of::<Esc>(), 4);
}
/// Encode self as an escape sequence. The escape sequence may potentially
/// be clear text with no actual escape sequences.
impl Display for Action {