event_wrapper_test_cases

Macro event_wrapper_test_cases 

Source
macro_rules! event_wrapper_test_cases {
    ($iface_enum:ty, $ufet: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

The macro takes two arguments:

  1. The event’s interface enum type.
  2. Any user facing event type that is wrapped by the interface enum.

§Examples

event_wrapper_test_cases!(MouseEvents, AbsEvent);

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.