{
    "content": [
        {
            "type": "text",
            "text": "# Type::Tiny::Manual::UsingWithTestMore (info)\n\n## NAME\n\nType::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites\n\n## Sections\n\n- **Type::Tiny::Manual::UsUseriContributType::Tiny::Manual::UsingWithTestMore(3pm)**\n- **NAME**\n- **MANUAL**\n- **NEXT STEPS**\n- **AUTHOR**\n- **COPYRIGHT AND LICENCE**\n- **DISCLAIMER OF WARRANTIES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Type::Tiny::Manual::UsingWithTestMore",
        "section": "",
        "mode": "info",
        "summary": "Type::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "Type::Tiny::Manual::UsUseriContributType::Tiny::Manual::UsingWithTestMore(3pm)",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MANUAL",
                "lines": 61,
                "subsections": []
            },
            {
                "name": "NEXT STEPS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISCLAIMER OF WARRANTIES",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "Type::Tiny::Manual::UsUseriContributType::Tiny::Manual::UsingWithTestMore(3pm)": {
                "content": "",
                "subsections": []
            },
            "NAME": {
                "content": "Type::Tiny::Manual::UsingWithTestMore - Type::Tiny for test suites\n",
                "subsections": []
            },
            "MANUAL": {
                "content": "Test::TypeTiny\nThis is a module for testing that types you've defined accept and\nreject the values you think they should.\n\nshouldpass($value, $type);\nshouldfail($othervalue, $type);\n\nEasy. (But yeah, I always forget whether the type goes first or\nsecond!)\n\nThere's also a function to test that subtype/supertype relationships\nare working okay.\n\noksubtype($type, @subtypes);\n\nOf course you can just check a type like this:\n\nok( $type->check($value) );\n\nBut the advantage of \"shouldpass\" is that if the \"EXTENDEDTESTING\"\nenvironment variable is set to true, \"shouldpass\" will also perform a\nstrict check on the value, which involves climbing up the type's\ninheritance tree (its parent, its parent's parent, etc) to make sure\nthe value passes all their constraints.\n\nIf a normal check and strict check differ, this is usually a problem in\nthe inlining code somewhere.\n\nSee Test::TypeTiny for more information.\n\nType::Tiny as a Replacement for Test::Deep\nHere's one of the examples from the Test::Deep documentation:\n\nmy $namere = re('^(Mr|Mrs|Miss) \\w+ \\w+$');\ncmpdeeply(\n$person,\n{\nName       => $namere,\nPhone      => re('^0d{6}$'),\nChildNames => arrayeach($namere)\n},\n\"person ok\"\n);\n\nIt's pretty easy to rewrite this to use Types::Standard:\n\nmy $name = StrMatch[ qr/^(Mr|Mrs|Miss) \\w+ \\w+$/ ];\nshouldpass(\n$person,\nDict[\nName         => $name,\nPhone        => StrMatch[ qr/^0d{6}$/ ],\nChildNames   => ArrayRef[$name]\n]\n);\n\nThere's nothing especially wrong with Test::Deep, but if you're already\nfamiliar with Type::Tiny's built-in types and you've maybe written your\nown type libraries too, it will save you having to switch between using\ntwo separate systems of checks.\n",
                "subsections": []
            },
            "NEXT STEPS": {
                "content": "Here's your next step:\n\no   Type::Tiny::Manual::Params\n\nAdvanced information on Type::Params, and using Type::Tiny with\nother signature modules like Function::Parameters and Kavorka.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Toby Inkster <tobyink@cpan.org>.\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENCE": {
                "content": "This software is copyright (c) 2013-2014, 2017-2021 by Toby Inkster.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n",
                "subsections": []
            },
            "DISCLAIMER OF WARRANTIES": {
                "content": "THIS PACKAGE IS PROVIDED \"AS IS\" AND WITHOUT ANY EXPRESS OR IMPLIED\nWARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF\nMERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n\nperl v5.32.1                      20Type::Tiny::Manual::UsingWithTestMore(3pm)",
                "subsections": []
            }
        }
    }
}