()
| 117 | |
| 118 | #[test] |
| 119 | fn test_error_messages() { |
| 120 | let error1 = simple_error("test error"); |
| 121 | assert_snapshot!(error1.to_string(), @r#"Error { kind: Error, span: None, reason: Simple("test error"), hints: [], code: None }"#); |
| 122 | |
| 123 | let error2 = simple_error("another error").with_span(Some(crate::span::Span { |
| 124 | start: 0, |
| 125 | end: 5, |
| 126 | source_id: 0, |
| 127 | })); |
| 128 | assert_debug_snapshot!(error2, @r#" |
| 129 | Error { |
| 130 | kind: Error, |
| 131 | span: Some( |
| 132 | 0:0-5, |
| 133 | ), |
| 134 | reason: Simple( |
| 135 | "another error", |
| 136 | ), |
| 137 | hints: [], |
| 138 | code: None, |
| 139 | } |
| 140 | "#); |
| 141 | } |
| 142 | } |
nothing calls this directly
no test coverage detected