Lines Matching refs:assert
86 assert!(error.is::<TestError>()); in new()
125 assert!(error.is::<LargeAlign>()); in from_error_with_large_align()
132 assert!(error.is::<&str>()); in msg()
149 assert!(error.is::<TestError>()); in from_error()
168 assert!(error.source().is_none()); in into_boxed_dyn_error()
175 assert!(e.is::<&str>()); in is()
176 assert!(!e.is::<TestError>()); in is()
177 assert!(!e.is::<OutOfMemory>()); in is()
181 assert!(e.is::<&str>()); in is()
182 assert!(e.is::<TestError>()); in is()
183 assert!(!e.is::<OutOfMemory>()); in is()
188 assert!(e.is::<&str>()); in is()
189 assert!(e.is::<TestError>()); in is()
190 assert!(!e.is::<OutOfMemory>()); in is()
194 assert!(e.is::<TestError>()); in is()
195 assert!(!e.is::<&str>()); in is()
196 assert!(!e.is::<OutOfMemory>()); in is()
200 assert!(e.is::<OutOfMemory>()); in is()
201 assert!(!e.is::<TestError>()); in is()
202 assert!(!e.is::<&str>()); in is()
210 assert!(error.root_cause().is::<std::fmt::Error>()); in is_for_root_cause_with_initial_error_source()
229 assert!(matches!( in backtrace()
274 assert!(error.is::<TestError>()); in format_err_macro_core_error()
296 assert!(chain.next().is_none()); in format_err_macro_core_error_chain()
311 assert!(error.is::<anyhow::Error>()); in format_err_is_anyhow()
353 assert!(ensure_string_literal(true).is_ok()); in ensure_macro()
363 assert!(ensure_format_implicit(true, 42).is_ok()); in ensure_macro()
373 assert!(ensure_format_explicit(true, 35).is_ok()); in ensure_macro()
383 assert!(ensure_core_error(true).is_ok()); in ensure_macro()
394 assert!(ensure_display(true).is_ok()); in ensure_macro()
401 assert!(ensure_bool_ref(&true).is_ok()); in ensure_macro()
408 assert!(ensure_no_message(42).is_ok()); in ensure_macro()
433 assert!(error.downcast::<OutOfMemory>().is_ok()); in downcast()
440 assert!(error.downcast::<OutOfMemory>().is_ok()); in downcast()
491 assert!(e.downcast_ref::<TestError>().is_none()); in downcast_ref()
492 assert!(e.downcast_ref::<OutOfMemory>().is_none()); in downcast_ref()
498 assert!(e.downcast_ref::<OutOfMemory>().is_none()); in downcast_ref()
504 assert!(e.downcast_ref::<OutOfMemory>().is_none()); in downcast_ref()
509 assert!(e.downcast_ref::<&str>().is_none()); in downcast_ref()
510 assert!(e.downcast_ref::<OutOfMemory>().is_none()); in downcast_ref()
514 assert!(e.downcast_ref::<OutOfMemory>().is_some()); in downcast_ref()
515 assert!(e.downcast_ref::<TestError>().is_none()); in downcast_ref()
516 assert!(e.downcast_ref::<&str>().is_none()); in downcast_ref()
523 assert!(e.downcast_mut::<TestError>().is_none()); in downcast_mut()
524 assert!(e.downcast_mut::<OutOfMemory>().is_none()); in downcast_mut()
530 assert!(e.downcast_mut::<OutOfMemory>().is_none()); in downcast_mut()
544 assert!(e.downcast_mut::<&str>().is_none()); in downcast_mut()
545 assert!(e.downcast_mut::<OutOfMemory>().is_none()); in downcast_mut()
551 assert!(e.downcast_mut::<OutOfMemory>().is_some()); in downcast_mut()
552 assert!(e.downcast_mut::<TestError>().is_none()); in downcast_mut()
553 assert!(e.downcast_mut::<&str>().is_none()); in downcast_mut()
560 assert!(error.is::<OutOfMemory>()); in context_on_oom()
561 assert!( in context_on_oom()
579 assert!(error.is::<TestError>()); in context_on_err_result()
582 assert!(error.is::<&str>()); in context_on_err_result()
599 assert!(error.is::<TestError>()); in context_on_none_option()
602 assert!(error.is::<&str>()); in context_on_none_option()
621 assert!(error.is::<TestError>()); in with_context_on_err_result()
622 assert!(error.is::<&str>()); in with_context_on_err_result()
643 assert!(error.is::<&str>()); in with_context_on_none_option()
646 assert!(error.is::<TestError>()); in with_context_on_none_option()
665 assert!(actual.starts_with(expected)); in fmt_debug()
667 assert!(actual.contains("Stack backtrace:")); in fmt_debug()
691 assert!(actual.starts_with(expected)); in fmt_debug_with_single_cause()
693 assert!(actual.contains("Stack backtrace:")); in fmt_debug_with_single_cause()
809 assert!(chain.next().is_none()); in chain()
812 assert!(chain.next().is_none(), "`Chain` is a fused iterator"); in chain()
840 assert!(chain.next().is_none()); in chain_on_error_with_source()
851 assert!(root.source().is_none()); in root_cause()
889 assert!(chain.next().is_none()); in chain_with_leaf_sources()
912 assert!(oom.requested_allocation_size() <= usize::try_from(isize::MAX).unwrap()); in oom_requested_allocation_size()
920 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_preserves_downcast()
922 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_preserves_downcast()
926 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_preserves_downcast()
927 assert!(e.downcast_ref::<&str>().is_some()); in anyhow_preserves_downcast()
929 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_preserves_downcast()
930 assert!(e.downcast_ref::<&str>().is_some()); in anyhow_preserves_downcast()
939 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_source_downcast()
942 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_source_downcast()
945 assert!(e.downcast_ref::<TestError>().is_some()); in anyhow_source_downcast()