{
    "content": [
        {
            "type": "text",
            "text": "# Test::Unit::Assertion (perldoc)\n\n## NAME\n\nTest::Unit::Assertion - The abstract base class for assertions\n\n## Sections\n\n- **NAME** (1 subsections)\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Test::Unit::Assertion",
        "section": "",
        "mode": "perldoc",
        "summary": "Test::Unit::Assertion - The abstract base class for assertions",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Required methods",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Any assertion class that expects to plug into Test::Unit::Assert needs to implement this\ninterface.\n",
                "subsections": [
                    {
                        "name": "Required methods",
                        "content": "new Creates a new assertion object. Takes whatever arguments you desire. Isn't strictly\nnecessary for the framework to work with this class but is generally considered a good idea.\n\ndoassertion\nThis is the important one. If Test::Unit::Assert::assert is called with an object as its\nfirst argument then it does:\n\n$[0]->doassertion(@[1 .. $#]) ||\n$self->fail(\"Assertion failed\");\n\nThis means that \"doassertion\" should return true if the assertion succeeds and false if it\ndoesn't. Or, you can fail by throwing a Test::Unit::Failure object, which will get caught\nfurther up the stack and used to produce a sensible error report. Generally it's good\npractice for doassertion to die with a meaningful error on assertion failure rather than\njust returning false.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Copyright (c) 2001 Piers Cawley <pdcawley@iterative-software.com>.\n\nAll rights reserved. This program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "*   Test::Unit::Assert\n\n*   Test::Unit::CodeRef\n\n*   Test::Unit::Regexp\n",
                "subsections": []
            }
        }
    }
}