use morphology_img::RenderError; #[test] fn test_error_display() { let err = RenderError::LilyPondNotFound("test".to_string()); assert_eq!(err.to_string(), "LilyPond not found: test"); } #[test] fn test_lilypond_execution_error() { let err = RenderError::LilyPondExecution("stderr output".to_string()); assert_eq!(err.to_string(), "LilyPond execution failed: stderr output"); } #[test] fn test_template_error() { let err = RenderError::Template("missing placeholder".to_string()); assert_eq!(err.to_string(), "Template error: missing placeholder"); } #[test] fn test_invalid_sequence_error() { let err = RenderError::InvalidSequence("empty sequence".to_string()); assert_eq!(err.to_string(), "Invalid sequence: empty sequence"); } #[test] fn test_io_error_conversion() { let io_err = std::io::Error::new(std::io::ErrorKind::NotFound, "file not found"); let err: RenderError = io_err.into(); assert!(matches!(err, RenderError::FileIO(_))); }