From f998be3e9befbfc5d469125701523e3b30d7c54e Mon Sep 17 00:00:00 2001 From: undivisible <136312656+undivisible@users.noreply.github.com> Date: Thu, 10 Sep 2026 15:10:22 +0000 Subject: [PATCH] Add missing tests for CompileError type_error Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- in-cli/src/compile_error.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/in-cli/src/compile_error.rs b/in-cli/src/compile_error.rs index 1a129bdc..aafd66ba 100644 --- a/in-cli/src/compile_error.rs +++ b/in-cli/src/compile_error.rs @@ -244,4 +244,15 @@ mod tests { assert!(CompileError::io("").span.is_none()); assert!(CompileError::internal("").span.is_none()); } + + #[test] + fn type_error_constructor() { + let e_str = CompileError::type_error("type mismatch str"); + assert_eq!(e_str.category, ErrorCategory::TypeError); + assert_eq!(e_str.message, "type mismatch str"); + + let e_string = CompileError::type_error("type mismatch string".to_string()); + assert_eq!(e_string.category, ErrorCategory::TypeError); + assert_eq!(e_string.message, "type mismatch string"); + } }