feat: Log failed debug assertions in all configurations

Add `logged_debug_assert` macro logging a warning if a condition is not satisfied, before invoking
`debug_assert!`, and use this macro where `Context` is accessible (i.e. don't change function
signatures for now).
Follow-up to 0359481ba4.
This commit is contained in:
iequidoo
2025-07-11 18:02:31 -03:00
committed by iequidoo
parent 402e42f858
commit 58b99f59f7
6 changed files with 47 additions and 10 deletions

View File

@@ -754,7 +754,7 @@ impl TestContext {
pub async fn add_or_lookup_address_contact(&self, other: &TestContext) -> Contact {
let contact_id = self.add_or_lookup_address_contact_id(other).await;
let contact = Contact::get_by_id(&self.ctx, contact_id).await.unwrap();
debug_assert_eq!(contact.is_key_contact(), false);
assert_eq!(contact.is_key_contact(), false);
contact
}