event_wrapper_test_cases

Macro event_wrapper_test_cases 

Source
macro_rules! event_wrapper_test_cases {
    ($type:ty, $any_subtype:ty) => { ... };
}
Expand description

Expands to five tests:

  1. into_and_try_from_event
  2. zbus_msg_invalid_interface
  3. zbus_msg_invalid_member
  4. zbus_msg_invalid_member_and_interface
  5. zbus_msg_conversion

§Examples

event_wrapper_test_cases!(MouseEvents, AbsEvent);

In the macro, its first argument $type is the event enum type.
The second argument $any_subtype is the event struct type.

For each of the types, the macro will create a module with the name events_tests_{foo} where {foo} is the snake case of the ‘interface enum’ name.