Lines Matching refs:assert_eq

87     assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42);  in new()
89 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 43); in new()
96 assert_eq!(drops.load(SeqCst), 0); in new_drops()
98 assert_eq!(drops.load(SeqCst), 1); in new_drops()
126 assert_eq!(error.downcast_ref::<LargeAlign>().unwrap().value, value); in from_error_with_large_align()
134 assert_eq!(msg, "uh oh!"); in msg()
141 assert_eq!(drops.load(SeqCst), 0); in msg_drops()
143 assert_eq!(drops.load(SeqCst), 1); in msg_drops()
150 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42); in from_error()
160 assert_eq!(error.to_string(), "yikes"); in into_boxed_dyn_error()
163 assert_eq!(error.to_string(), "whoops"); in into_boxed_dyn_error()
166 assert_eq!(error.to_string(), "ouch"); in into_boxed_dyn_error()
218 assert_eq!(e.backtrace().status(), BacktraceStatus::Disabled); in backtrace()
234 assert_eq!(e.backtrace().status(), BacktraceStatus::Disabled); in backtrace()
251 assert_eq!(error.to_string(), "literal"); in format_err_macro_string_literal()
259 assert_eq!(error.to_string(), "implicit args 42 36"); in format_err_macro_format_implicit_args()
267 assert_eq!(error.to_string(), "explicit args 42 36"); in format_err_macro_format_explicit_args()
275 assert_eq!(error.to_string(), "TestError(42)"); in format_err_macro_core_error()
288 assert_eq!(e.to_string(), "whoops"); in format_err_macro_core_error_chain()
291 assert_eq!(e.to_string(), "yikes"); in format_err_macro_core_error_chain()
294 assert_eq!(e.to_string(), "ouch"); in format_err_macro_core_error_chain()
303 assert_eq!(error.to_string(), "42"); in format_err_macro_msg()
312 assert_eq!(error.to_string(), "oof"); in format_err_is_anyhow()
320 assert_eq!(bail_string_literal().unwrap_err().to_string(), "whoops"); in bail_macro()
325 assert_eq!( in bail_macro()
333 assert_eq!(bail_format_explicit(35).unwrap_err().to_string(), "ouch 36"); in bail_macro()
338 assert_eq!(bail_core_error().unwrap_err().to_string(), "TestError(13)"); in bail_macro()
344 assert_eq!(bail_display().unwrap_err().to_string(), "1337"); in bail_macro()
354 assert_eq!( in ensure_macro()
364 assert_eq!( in ensure_macro()
374 assert_eq!( in ensure_macro()
384 assert_eq!( in ensure_macro()
395 assert_eq!(ensure_display(false).unwrap_err().to_string(), "1337"); in ensure_macro()
402 assert_eq!(ensure_bool_ref(&false).unwrap_err().to_string(), "whoops"); in ensure_macro()
409 assert_eq!( in ensure_macro()
421 assert_eq!(error.downcast::<&str>().unwrap(), "uh oh"); in downcast()
427 assert_eq!(error.downcast::<TestError>().unwrap().0, 42); in downcast()
447 assert_eq!(error.downcast::<&str>().unwrap(), "yikes"); in downcast()
454 assert_eq!(error.downcast::<TestError>().unwrap().0, 42); in downcast()
458 assert_eq!(error.downcast::<TestError>().unwrap().0, 36); in downcast()
468 assert_eq!(drops.load(SeqCst), 0); in downcast_drops_everything()
470 assert_eq!(drops.load(SeqCst), 2); in downcast_drops_everything()
472 assert_eq!(drops.load(SeqCst), 3); in downcast_drops_everything()
479 assert_eq!(drops.load(SeqCst), 0); in downcast_drops_everything()
481 assert_eq!(drops.load(SeqCst), 2); in downcast_drops_everything()
483 assert_eq!(drops.load(SeqCst), 3); in downcast_drops_everything()
490 assert_eq!(e.downcast_ref::<&str>().copied().unwrap(), "str"); in downcast_ref()
496 assert_eq!(e.downcast_ref::<&str>().copied().unwrap(), "str"); in downcast_ref()
497 assert_eq!(e.downcast_ref::<TestError>().unwrap().0, 42); in downcast_ref()
502 assert_eq!(e.downcast_ref::<&str>().copied().unwrap(), "another str"); in downcast_ref()
503 assert_eq!(e.downcast_ref::<TestError>().unwrap().0, 42); in downcast_ref()
508 assert_eq!(e.downcast_ref::<TestError>().unwrap().0, 36); in downcast_ref()
526 assert_eq!(*e.downcast_ref::<&str>().unwrap(), "whoops"); in downcast_mut()
532 assert_eq!(*e.downcast_ref::<&str>().unwrap(), "uh oh"); in downcast_mut()
534 assert_eq!(e.downcast_ref::<TestError>().unwrap().0, 43); in downcast_mut()
539 assert_eq!(*e.downcast_ref::<&str>().unwrap(), "yikes"); in downcast_mut()
540 assert_eq!(format!("{e:#}"), "yikes: TestError(43): uh oh"); in downcast_mut()
547 assert_eq!(e.downcast_ref::<TestError>().unwrap().0, 37); in downcast_mut()
571 assert_eq!(result.unwrap(), 42); in context_on_ok_result()
580 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42); in context_on_err_result()
583 assert_eq!(error.downcast_ref::<&str>().copied().unwrap(), "uh oh"); in context_on_err_result()
590 assert_eq!(result.unwrap(), 42); in context_on_some_option()
600 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42); in context_on_none_option()
603 assert_eq!(error.downcast_ref::<&str>().copied().unwrap(), "uh oh"); in context_on_none_option()
612 assert_eq!(result.unwrap(), 42); in with_context_on_ok_result()
623 assert_eq!(error.downcast_ref::<&str>().copied().unwrap(), "uh oh"); in with_context_on_err_result()
632 assert_eq!(result.unwrap(), 36); in with_context_on_some_option()
644 assert_eq!(error.downcast_ref::<&str>().copied().unwrap(), "uh oh"); in with_context_on_none_option()
647 assert_eq!(error.downcast_ref::<TestError>().unwrap().0, 42); in with_context_on_none_option()
673 assert_eq!(actual, expected); in fmt_debug()
699 assert_eq!(actual, expected); in fmt_debug_with_single_cause()
751 assert_eq!(actual, expected); in fmt_debug_alternate()
774 assert_eq!(actual, expected); in fmt_debug_alternate_with_oom()
780 assert_eq!(format!("{error}"), "yikes"); in fmt_display()
789 assert_eq!(format!("{error:#}"), "yikes: uh oh: whoops: ouch"); in fmt_display_alternate()
801 assert_eq!(e.to_string(), "TestError(42)"); in chain()
804 assert_eq!(e.to_string(), "uh oh"); in chain()
807 assert_eq!(e.to_string(), "failure"); in chain()
826 assert_eq!(e.to_string(), "oof"); in chain_on_error_with_source()
829 assert_eq!(e.to_string(), "ouch"); in chain_on_error_with_source()
832 assert_eq!(e.to_string(), "uh oh"); in chain_on_error_with_source()
835 assert_eq!(e.to_string(), "whoops"); in chain_on_error_with_source()
838 assert_eq!(e.to_string(), "yikes"); in chain_on_error_with_source()
850 assert_eq!(root.to_string(), "yikes"); in root_cause()
878 assert_eq!(e.to_string(), "wow"); in chain_with_leaf_sources()
881 assert_eq!(e.to_string(), "oof"); in chain_with_leaf_sources()
884 assert_eq!(e.to_string(), "leaf"); in chain_with_leaf_sources()
887 assert_eq!(e.to_string(), "TestError(42)"); in chain_with_leaf_sources()
898 assert_eq!(oom.requested_allocation_size(), bytes); in oom_requested_allocation_size()
902 assert_eq!(oom.requested_allocation_size(), bytes); in oom_requested_allocation_size()
906 assert_eq!(oom.requested_allocation_size(), bytes); in oom_requested_allocation_size()
965 (Some(x), Some(y)) => assert_eq!(x, y), in assert_chain()