Skip to content

Commit

Permalink
✅ zb: Add a few more assertions in a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zeenix committed May 8, 2024
1 parent 9685163 commit c4630dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zbus/tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ async fn my_iface_test(conn: Connection, event: Event) -> zbus::Result<u32> {
<&Value as TryInto<u32>>::try_into(changed_value).unwrap(),
expected_property_value
);
assert!(args.invalidated_properties().is_empty());

proxy
.set_emits_changed_true(expected_property_value)
Expand All @@ -857,6 +858,7 @@ async fn my_iface_test(conn: Connection, event: Event) -> zbus::Result<u32> {
<&Value as TryInto<u32>>::try_into(changed_value).unwrap(),
expected_property_value
);
assert!(args.invalidated_properties().is_empty());

proxy
.set_emits_changed_invalidates(expected_property_value)
Expand Down Expand Up @@ -887,6 +889,8 @@ async fn my_iface_test(conn: Connection, event: Event) -> zbus::Result<u32> {
args.invalidated_properties(),
&vec![unexpected_property_key.to_string()]
);
assert!(!args.changed_properties().is_empty());
assert!(args.invalidated_properties().is_empty());

proxy
.set_emits_changed_false(expected_property_value)
Expand All @@ -901,6 +905,8 @@ async fn my_iface_test(conn: Connection, event: Event) -> zbus::Result<u32> {
args.invalidated_properties(),
&vec![unexpected_property_key.to_string()]
);
assert!(!args.changed_properties().is_empty());
assert!(args.invalidated_properties().is_empty());

proxy.quit().await?;
Ok(val)
Expand Down

0 comments on commit c4630dd

Please sign in to comment.