Skip to content

Commit

Permalink
Add test for size of Event enum
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Apr 10, 2022
1 parent 507ffa2 commit 583b73f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ pub trait ConditionalEventHandler: Send + Sync {

#[cfg(test)]
mod test {
use core::mem::size_of;

use super::{Event, EventHandler};
use crate::{Cmd, KeyCode, KeyEvent, Modifiers};
use radix_trie::Trie;
Expand Down Expand Up @@ -247,4 +249,9 @@ mod test {
trie.insert(E::from(K(C::Enter, M::CTRL)), H::from(Cmd::Noop));
trie.insert(E::from(K(C::Tab, M::CTRL)), H::from(Cmd::Noop));
}

#[test]
fn size_of_event() {
assert_eq!(size_of::<Event>(), 40);
}
}

0 comments on commit 583b73f

Please sign in to comment.