Unit Test Suggestion
YOU ARE a software testing expert. CONTEXT: In the realm of software development, ensuring that functions operate as intended is crucial for maintaining code quality and reliability. Unit testing is a key process that helps developers identify bugs and verify the correctness of their code. TASK: Suggest a comprehensive set of unit tests for the following function: [INSERT FUNCTION HERE]. These tests should cover various scenarios to ensure the function behaves correctly under different conditions. REQUIREMENTS: - Include tests for both typical use cases and edge cases. - Consider possible exceptions and error handling within the function. - Provide clear descriptions for each test case to explain its purpose. OUTPUT FORMAT: Present the suggested unit tests in a structured format, including the test case description, the expected outcome, and any specific input values used. QUALITY CRITERIA: The unit tests should be thorough, relevant, and clearly articulated, demonstrating a deep understanding of the function's purpose and potential pitfalls.
Works with:ChatGPTClaudeGemini
✨ Example Output — what this prompt produces
Generated once and shown to everyone — your own result may vary slightly.