From f914d8c47cd70ac77664abf4b883247934e656bd Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 01:38:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Add=20test=20for=20ToolError::in?= =?UTF-8?q?valid=5Finput?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a unit test for the `ToolError::invalid_input` constructor to ensure it correctly maps to the `ToolError::InvalidInput` variant with the expected message. Co-authored-by: Hmbown <101357273+Hmbown@users.noreply.github.com> --- crates/tools/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/tools/src/lib.rs b/crates/tools/src/lib.rs index b8be58246..432011311 100644 --- a/crates/tools/src/lib.rs +++ b/crates/tools/src/lib.rs @@ -559,4 +559,13 @@ mod tests { "Failed to validate input: missing required field 'path'" ); } + + #[test] + fn tool_error_invalid_input_creates_correct_variant() { + let err = ToolError::invalid_input("test invalid message"); + match err { + ToolError::InvalidInput { message } => assert_eq!(message, "test invalid message"), + _ => panic!("Expected ToolError::InvalidInput, got {:?}", err), + } + } }