{
    "mode": "perldoc",
    "parameter": "Test::Unit::Result",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Test%3A%3AUnit%3A%3AResult/json",
    "generated": "2026-06-14T05:39:19Z",
    "synopsis": "This class is not intended to be used directly",
    "sections": {
        "NAME": {
            "content": "Test::Unit::Result - unit testing framework helper class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "This class is not intended to be used directly\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This class is used by the framework to record the results of tests, which will throw an instance\nof a subclass of Test::Unit::Exception in case of errors or failures.\n\nTo achieve this, this class gets called with a test case as argument. It will call this test\ncase's run method back and catch any exceptions thrown.\n\nIt could be argued that Test::Unit::Result is the heart of the PerlUnit framework, since\nTestCase classes vary, and you can use one of several Test::Unit::TestRunners, but we always\ngather the results in a Test::Unit::Result object.\n\nThis is the quintessential call tree of the communication needed to record the results of a\ngiven test:\n\n$aTestCase->run() {\n# creates result\n$aTestResult->run($aTestCase) {\n# catches exception and records it\n$aTestCase->runbare() {\n# runs test method inside eval\n$aTestCase->runtest() {\n# calls method $aTestCase->name()\n# and propagates exception\n# method will call Assert::assert()\n# to cause failure if test fails on\n# test assertion\n# it finds this because $aTestCase is-a Assert\n}\n}\n}\n}\n\nNote too that, in the presence of Test::Unit::TestSuites, this call tree can get a little more\nconvoluted, but if you bear the above in mind it should be apparent what's going on.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (c) 2000-2002, 2005 the PerlUnit Development Team (see Test::Unit or the AUTHORS file\nincluded in this distribution).\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::TestCase\n\n*   Test::Unit::Exception\n",
            "subsections": []
        }
    },
    "summary": "Test::Unit::Result - unit testing framework helper class",
    "flags": [],
    "examples": [],
    "see_also": []
}