{"id":13413909,"url":"https://github.com/MarvinJWendt/testza","last_synced_at":"2025-03-14T20:30:47.681Z","repository":{"id":37487244,"uuid":"383200738","full_name":"MarvinJWendt/testza","owner":"MarvinJWendt","description":"Full-featured test framework for Go! Assertions, fuzzing, input testing, output capturing, and much more! 🍕","archived":false,"fork":false,"pushed_at":"2023-08-21T15:04:48.000Z","size":634,"stargazers_count":417,"open_issues_count":9,"forks_count":21,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-14T15:37:20.002Z","etag":null,"topics":["automatic-testing","fuzzy-testing","go","golang","golang-library","hacktoberfest","test","test-framework","testing","testing-framework","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarvinJWendt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["MarvinJWendt"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-07-05T16:21:38.000Z","updated_at":"2024-10-10T11:12:17.000Z","dependencies_parsed_at":"2024-06-18T13:40:42.529Z","dependency_job_id":"f6e5738e-67d7-4d3e-9b36-de95aeb8db92","html_url":"https://github.com/MarvinJWendt/testza","commit_stats":{"total_commits":623,"total_committers":12,"mean_commits":"51.916666666666664","dds":0.1059390048154093,"last_synced_commit":"3fab8a745e09d74abd1694e2c85880d2528e2500"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinJWendt%2Ftestza","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinJWendt%2Ftestza/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinJWendt%2Ftestza/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinJWendt%2Ftestza/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarvinJWendt","download_url":"https://codeload.github.com/MarvinJWendt/testza/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642007,"owners_count":20323948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automatic-testing","fuzzy-testing","go","golang","golang-library","hacktoberfest","test","test-framework","testing","testing-framework","unit-testing"],"created_at":"2024-07-30T20:01:52.529Z","updated_at":"2025-03-14T20:30:47.657Z","avatar_url":"https://github.com/MarvinJWendt.png","language":"Go","funding_links":["https://github.com/sponsors/MarvinJWendt"],"categories":["Testing","Go","测试","Template Engines","Testing Frameworks"],"sub_categories":["Testing Frameworks","HTTP客户端","HTTP Clients"],"readme":"\u003ch1 align=\"center\"\u003etestza 🍕\u003c/h1\u003e\n\u003cp align=\"center\"\u003eTestza is like pizza for Go - you could live without it, but why should you?\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\n\u003ca href=\"https://github.com/MarvinJWendt/testza/releases\"\u003e\n\u003cimg src=\"https://img.shields.io/github/v/release/MarvinJWendt/testza?style=flat-square\" alt=\"Latest Release\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://codecov.io/gh/MarvinJWendt/testza\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/MarvinJWendt/testza/go.yml?label=tests\u0026style=flat-square\" alt=\"Tests\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://codecov.io/gh/MarvinJWendt/testza\" target=\"_blank\"\u003e\n\u003cimg src=\"https://img.shields.io/codecov/c/gh/MarvinJWendt/testza?color=magenta\u0026logo=codecov\u0026style=flat-square\" alt=\"Coverage\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://codecov.io/gh/MarvinJWendt/testza\"\u003e\n\u003c!-- unittestcount:start --\u003e\u003cimg src=\"https://img.shields.io/badge/Unit_Tests-2956-magenta?style=flat-square\" alt=\"Unit test count\"\u003e\u003c!-- unittestcount:end --\u003e\n\u003c/a\u003e\n  \n\u003ca href=\"https://pkg.go.dev/github.com/MarvinJWendt/testza\" target=\"_blank\"\u003e\n\u003cimg src=\"https://pkg.go.dev/badge/github.com/MarvinJWendt/testza.svg\" alt=\"Go Reference\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://goreportcard.com/report/github.com/MarvinJWendt/testza\" target=\"_blank\"\u003e\n\u003cimg src=\"https://goreportcard.com/badge/github.com/MarvinJWendt/testza?style=flat-square\" alt=\"Go report\"\u003e\n\u003c/a\u003e  \n\n\u003c/p\u003e\n\n\n---\n\n\u003cp align=\"center\"\u003e\n\u003cstrong\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#-installation\"\u003eGet The Module\u003c/a\u003e\u003c/strong\u003e\n|\n\u003cstrong\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#-documentation\" target=\"_blank\"\u003eDocumentation\u003c/a\u003e\u003c/strong\u003e\n|\n\u003cstrong\u003e\u003ca href=\"https://github.com/atomicgo/atomicgo/blob/main/CONTRIBUTING.md\" target=\"_blank\"\u003eContributing\u003c/a\u003e\u003c/strong\u003e\n|\n\u003cstrong\u003e\u003ca href=\"https://github.com/atomicgo/atomicgo/blob/main/CODE_OF_CONDUCT.md\" target=\"_blank\"\u003eCode of Conduct\u003c/a\u003e\u003c/strong\u003e\n\u003c/p\u003e\n\n---\n\n\u003cimg align=\"right\" height=\"400\" alt=\"Screenshot of an example test message\" src=\"https://user-images.githubusercontent.com/31022056/161153895-e772bc61-b751-407f-b526-8f6a66d8f8d5.png\" /\u003e\n\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://discord.gg/vE2dNkfAmF\"\u003e\n\u003cimg width=\"300\" src=\"https://user-images.githubusercontent.com/31022056/158916278-4504b838-7ecb-4ab9-a900-7dc002aade78.png\" alt=\"Join us on Discord!\" /\u003e\n\u003cbr/\u003e\n\u003cb\u003eJoin us on Discord for support, discussions, updates and general talk!\u003c/b\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## 📦 Installation\n\n```console\n# Execute this command inside your project\ngo get github.com/MarvinJWendt/testza\n```\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## 📝 Description\n\nTestza is a full-featured testing framework for Go.\nIt integrates with the default test runner, so you can use it with the standard `go test` tool.\nTestza contains easy to use methods, like assertions, output capturing, fuzzing, and much more.\n\nThe main goal of testza is to provide an easy and fun experience writing tests and providing a nice, user-friendly output.\nEven developers who never used testza, will get into it quickly.\n\n## ⭐ Features\n\n| Feature            | Description                                                                                                                                          |\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Assertions         | Assertions allow you to quickly check objects for expected values.                                                                                   |\n| Fuzzing            | Fuzzing allows you to check functions against sets of generated input parameters.\u003cbr/\u003eA couple lines of test code can run thousands of sanity tests. |\n| Output Capture     | Capture and validate output written to the terminal.\u003cbr/\u003ePerfect for CLI tools.                                                                      |\n| Snapshots          | Snapshot objects between test runs, to ensure a consistent behaviour.                                                                                |\n| Clean Output       | Clean and colorful output provides you the needed details in an easy-to-understand format.                                                           |\n| System Information | Testza prints information about the system on startup.\u003cbr/\u003e You can quickly figure out what's wrong, when a user submits an issue.                   |\n| Well Documented    | Every function of testza is well documented and contains an example to make usage super easy.                                                        |\n| Customizable       | Testza features customizable settings, if you want to change something.                                                                              |\n| Test flags         | You can configure testza via flags too!\u003cbr/\u003eThat makes it super simple to change test runs, or output, without touching code!                        |\n\n## 🚀 Getting Started\n\nSee the examples below for a quick introduction!\n\n```go\n// --- Some Examples ---\n\n// - Some assertions -\ntestza.AssertTrue(t, true) // -\u003e Pass\ntestza.AssertNoError(t, err) // -\u003e Pass\ntestza.AssertEqual(t, object, object) // -\u003e Pass\n// ...\n\n// - Testing console output -\n// Test the output of your CLI tool easily!\nterminalOutput, _ := testza.CaptureStdout(func(w io.Writer) error {fmt.Println(\"Hello\"); return nil})\ntestza.AssertEqual(t, terminalOutput, \"Hello\\n\") // -\u003e Pass\n\n// - Fuzzing -\n// Testing a function that accepts email addresses as a parameter:\n\n// Testset of many different email addresses\nemailAddresses := testza.FuzzStringEmailAddresses()\n\n// Run a test for every string in the test set\ntestza.FuzzStringRunTests(t, emailAddresses, func(t *testing.T, index int, str string) {\n  user, domain, err := internal.ParseEmailAddress(str) // Use your function\n  testza.AssertNoError(t, err) // Assert that your function does not return an error\n  testza.AssertNotZero(t, user) // Assert that the user is returned\n  testza.AssertNotZero(t, domain) // Assert that the domain is returned\n})\n\n// And that's just a few examples of what you can do with Testza!\n```\n\n## 📚 Documentation\n\n\u003c!-- docs:start --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eModule\u003c/th\u003e\n    \u003cth\u003eMethods\u003c/th\u003e\n  \u003c/tr\u003e\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Settings\"\u003eSettings\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [SetColorsEnabled](https://github.com/MarvinJWendt/testza#SetColorsEnabled)\n  - [SetDiffContextLines](https://github.com/MarvinJWendt/testza#SetDiffContextLines)\n  - [SetLineNumbersEnabled](https://github.com/MarvinJWendt/testza#SetLineNumbersEnabled)\n  - [SetRandomSeed](https://github.com/MarvinJWendt/testza#SetRandomSeed)\n  - [SetShowStartupMessage](https://github.com/MarvinJWendt/testza#SetShowStartupMessage)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Assert\"\u003eAssert\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [AssertCompletesIn](https://github.com/MarvinJWendt/testza#AssertCompletesIn)\n  - [AssertContains](https://github.com/MarvinJWendt/testza#AssertContains)\n  - [AssertDecreasing](https://github.com/MarvinJWendt/testza#AssertDecreasing)\n  - [AssertDirEmpty](https://github.com/MarvinJWendt/testza#AssertDirEmpty)\n  - [AssertDirExists](https://github.com/MarvinJWendt/testza#AssertDirExists)\n  - [AssertDirNotEmpty](https://github.com/MarvinJWendt/testza#AssertDirNotEmpty)\n  - [AssertEqual](https://github.com/MarvinJWendt/testza#AssertEqual)\n  - [AssertEqualValues](https://github.com/MarvinJWendt/testza#AssertEqualValues)\n  - [AssertErrorIs](https://github.com/MarvinJWendt/testza#AssertErrorIs)\n  - [AssertFalse](https://github.com/MarvinJWendt/testza#AssertFalse)\n  - [AssertFileExists](https://github.com/MarvinJWendt/testza#AssertFileExists)\n  - [AssertGreater](https://github.com/MarvinJWendt/testza#AssertGreater)\n  - [AssertGreaterOrEqual](https://github.com/MarvinJWendt/testza#AssertGreaterOrEqual)\n  - [AssertImplements](https://github.com/MarvinJWendt/testza#AssertImplements)\n  - [AssertInRange](https://github.com/MarvinJWendt/testza#AssertInRange)\n  - [AssertIncreasing](https://github.com/MarvinJWendt/testza#AssertIncreasing)\n  - [AssertKindOf](https://github.com/MarvinJWendt/testza#AssertKindOf)\n  - [AssertLen](https://github.com/MarvinJWendt/testza#AssertLen)\n  - [AssertLess](https://github.com/MarvinJWendt/testza#AssertLess)\n  - [AssertLessOrEqual](https://github.com/MarvinJWendt/testza#AssertLessOrEqual)\n  - [AssertNil](https://github.com/MarvinJWendt/testza#AssertNil)\n  - [AssertNoDirExists](https://github.com/MarvinJWendt/testza#AssertNoDirExists)\n  - [AssertNoError](https://github.com/MarvinJWendt/testza#AssertNoError)\n  - [AssertNoFileExists](https://github.com/MarvinJWendt/testza#AssertNoFileExists)\n  - [AssertNoSubset](https://github.com/MarvinJWendt/testza#AssertNoSubset)\n  - [AssertNotCompletesIn](https://github.com/MarvinJWendt/testza#AssertNotCompletesIn)\n  - [AssertNotContains](https://github.com/MarvinJWendt/testza#AssertNotContains)\n  - [AssertNotEqual](https://github.com/MarvinJWendt/testza#AssertNotEqual)\n  - [AssertNotEqualValues](https://github.com/MarvinJWendt/testza#AssertNotEqualValues)\n  - [AssertNotErrorIs](https://github.com/MarvinJWendt/testza#AssertNotErrorIs)\n  - [AssertNotImplements](https://github.com/MarvinJWendt/testza#AssertNotImplements)\n  - [AssertNotInRange](https://github.com/MarvinJWendt/testza#AssertNotInRange)\n  - [AssertNotKindOf](https://github.com/MarvinJWendt/testza#AssertNotKindOf)\n  - [AssertNotNil](https://github.com/MarvinJWendt/testza#AssertNotNil)\n  - [AssertNotNumeric](https://github.com/MarvinJWendt/testza#AssertNotNumeric)\n  - [AssertNotPanics](https://github.com/MarvinJWendt/testza#AssertNotPanics)\n  - [AssertNotRegexp](https://github.com/MarvinJWendt/testza#AssertNotRegexp)\n  - [AssertNotSameElements](https://github.com/MarvinJWendt/testza#AssertNotSameElements)\n  - [AssertNotUnique](https://github.com/MarvinJWendt/testza#AssertNotUnique)\n  - [AssertNotZero](https://github.com/MarvinJWendt/testza#AssertNotZero)\n  - [AssertNumeric](https://github.com/MarvinJWendt/testza#AssertNumeric)\n  - [AssertPanics](https://github.com/MarvinJWendt/testza#AssertPanics)\n  - [AssertRegexp](https://github.com/MarvinJWendt/testza#AssertRegexp)\n  - [AssertSameElements](https://github.com/MarvinJWendt/testza#AssertSameElements)\n  - [AssertSubset](https://github.com/MarvinJWendt/testza#AssertSubset)\n  - [AssertTestFails](https://github.com/MarvinJWendt/testza#AssertTestFails)\n  - [AssertTrue](https://github.com/MarvinJWendt/testza#AssertTrue)\n  - [AssertUnique](https://github.com/MarvinJWendt/testza#AssertUnique)\n  - [AssertZero](https://github.com/MarvinJWendt/testza#AssertZero)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Capture\"\u003eCapture\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [CaptureStderr](https://github.com/MarvinJWendt/testza#CaptureStderr)\n  - [CaptureStdout](https://github.com/MarvinJWendt/testza#CaptureStdout)\n  - [CaptureStdoutAndStderr](https://github.com/MarvinJWendt/testza#CaptureStdoutAndStderr)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Fuzz-Utils\"\u003eFuzz Utils\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [FuzzUtilDistinctSet](https://github.com/MarvinJWendt/testza#FuzzUtilDistinctSet)\n  - [FuzzUtilLimitSet](https://github.com/MarvinJWendt/testza#FuzzUtilLimitSet)\n  - [FuzzUtilMergeSets](https://github.com/MarvinJWendt/testza#FuzzUtilMergeSets)\n  - [FuzzUtilModifySet](https://github.com/MarvinJWendt/testza#FuzzUtilModifySet)\n  - [FuzzUtilRunTests](https://github.com/MarvinJWendt/testza#FuzzUtilRunTests)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Fuzz-Booleans\"\u003eFuzz Booleans\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [FuzzBoolFull](https://github.com/MarvinJWendt/testza#FuzzBoolFull)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Fuzz-Strings\"\u003eFuzz Strings\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [FuzzStringEmailAddresses](https://github.com/MarvinJWendt/testza#FuzzStringEmailAddresses)\n  - [FuzzStringEmpty](https://github.com/MarvinJWendt/testza#FuzzStringEmpty)\n  - [FuzzStringFull](https://github.com/MarvinJWendt/testza#FuzzStringFull)\n  - [FuzzStringGenerateRandom](https://github.com/MarvinJWendt/testza#FuzzStringGenerateRandom)\n  - [FuzzStringHtmlTags](https://github.com/MarvinJWendt/testza#FuzzStringHtmlTags)\n  - [FuzzStringLong](https://github.com/MarvinJWendt/testza#FuzzStringLong)\n  - [FuzzStringNumeric](https://github.com/MarvinJWendt/testza#FuzzStringNumeric)\n  - [FuzzStringUsernames](https://github.com/MarvinJWendt/testza#FuzzStringUsernames)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Fuzz-Float64s\"\u003eFuzz Float64s\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [FuzzFloat64Full](https://github.com/MarvinJWendt/testza#FuzzFloat64Full)\n  - [FuzzFloat64GenerateRandomNegative](https://github.com/MarvinJWendt/testza#FuzzFloat64GenerateRandomNegative)\n  - [FuzzFloat64GenerateRandomPositive](https://github.com/MarvinJWendt/testza#FuzzFloat64GenerateRandomPositive)\n  - [FuzzFloat64GenerateRandomRange](https://github.com/MarvinJWendt/testza#FuzzFloat64GenerateRandomRange)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Fuzz-Integers\"\u003eFuzz Integers\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [FuzzIntFull](https://github.com/MarvinJWendt/testza#FuzzIntFull)\n  - [FuzzIntGenerateRandomNegative](https://github.com/MarvinJWendt/testza#FuzzIntGenerateRandomNegative)\n  - [FuzzIntGenerateRandomPositive](https://github.com/MarvinJWendt/testza#FuzzIntGenerateRandomPositive)\n  - [FuzzIntGenerateRandomRange](https://github.com/MarvinJWendt/testza#FuzzIntGenerateRandomRange)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003ca href=\"https://github.com/MarvinJWendt/testza#Snapshot\"\u003eSnapshot\u003c/a\u003e\u003c/td\u003e\n\u003ctd\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\n  - [SnapshotCreate](https://github.com/MarvinJWendt/testza#SnapshotCreate)\n  - [SnapshotCreateOrValidate](https://github.com/MarvinJWendt/testza#SnapshotCreateOrValidate)\n  - [SnapshotValidate](https://github.com/MarvinJWendt/testza#SnapshotValidate)\n\u003c/td\u003e\n\n\u003c/details\u003e\n\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Assert\n\n#### AssertCompletesIn\n\n```go\nfunc AssertCompletesIn(t testRunner, duration time.Duration, f func(), msg ...any)\n```\n\nAssertCompletesIn asserts that a function completes in a given time.\nUse this function to test that functions do not take too long to complete.\n\nNOTE: Every system takes a different amount of time to complete a function.\nDo not set the duration too low, if you want consistent results.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertCompletesIn(t, 2 * time.Second, func() {\n    \t// some code that should take less than 2 seconds...\n    }) // =\u003e PASS\n\n#### AssertContains\n\n```go\nfunc AssertContains(t testRunner, object, element any, msg ...any)\n```\n\nAssertContains asserts that a string/list/array/slice/map contains the\nspecified element.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertContains(t, []int{1,2,3}, 2)\n    testza.AssertContains(t, []string{\"Hello\", \"World\"}, \"World\")\n    testza.AssertContains(t, \"Hello, World!\", \"World\")\n\n#### AssertDecreasing\n\n```go\nfunc AssertDecreasing(t testRunner, object any, msg ...any)\n```\n\nAssertDecreasing asserts that the values in a slice are decreasing. the test\nfails if the values are not in a slice or if the values are not comparable.\n\nValid input kinds are: []int, []int8, []int16, []int32, []int64, []uint,\n[]uint8, []uint16, []uint32, []uint64, []float32, []float64.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertDecreasing(t, []int{1000, 137, 2, 1})\n    testza.AssertDecreasing(t, []float32{13.5, 7, 0.1, -10.3})\n\n#### AssertDirEmpty\n\n```go\nfunc AssertDirEmpty(t testRunner, dir string, msg ...any)\n```\n\nAssertDirEmpty asserts that a directory is empty. The test will pass when\nthe directory is empty or does not exist.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertDirEmpty(t, \"FolderName\")\n\n#### AssertDirExists\n\n```go\nfunc AssertDirExists(t testRunner, dir string, msg ...any)\n```\n\nAssertDirExists asserts that a directory exists. The test will pass when the\ndirectory exists, and it's visible to the current user. The test will fail,\nif the path points to a file.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertDirExists(t, \"FolderName\")\n\n#### AssertDirNotEmpty\n\n```go\nfunc AssertDirNotEmpty(t testRunner, dir string, msg ...any)\n```\n\nAssertDirNotEmpty asserts that a directory is not empty The test will pass\nwhen the directory is not empty and will fail if the directory does not\nexist.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertDirNotEmpty(t, \"FolderName\")\n\n#### AssertEqual\n\n```go\nfunc AssertEqual(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertEqual asserts that two objects are equal.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertEqual(t, \"Hello, World!\", \"Hello, World!\")\n    testza.AssertEqual(t, true, true)\n\n#### AssertEqualValues\n\n```go\nfunc AssertEqualValues(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertEqualValues asserts that two objects have equal values. The order of\nthe values is also validated.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertEqualValues(t, []string{\"Hello\", \"World\"}, []string{\"Hello\", \"World\"})\n    testza.AssertEqualValues(t, []int{1,2}, []int{1,2})\n    testza.AssertEqualValues(t, []int{1,2}, []int{2,1}) // FAILS (wrong order)\n\nComparing struct values:\n\n    person1 := Person{\n      Name:   \"Marvin Wendt\",\n      Age:    20,\n      Gender: \"male\",\n    }\n\n    person2 := Person{\n      Name:   \"Marvin Wendt\",\n      Age:    20,\n      Gender: \"male\",\n    }\n\n    testza.AssertEqualValues(t, person1, person2)\n\n#### AssertErrorIs\n\n```go\nfunc AssertErrorIs(t testRunner, err, target error, msg ...any)\n```\n\nAssertErrorIs asserts that target is inside the error chain of err.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    var testErr = errors.New(\"hello world\")\n    var testErrWrapped = fmt.Errorf(\"test err: %w\", testErr)\n    testza.AssertErrorIs(t, testErrWrapped ,testErr)\n\n#### AssertFalse\n\n```go\nfunc AssertFalse(t testRunner, value any, msg ...any)\n```\n\nAssertFalse asserts that an expression or object resolves to false.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertFalse(t, false)\n    testza.AssertFalse(t, 1 == 2)\n    testza.AssertFalse(t, 2 != 2)\n    testza.AssertFalse(t, 1 \u003e 5 \u0026\u0026 4 \u003c 0)\n\n#### AssertFileExists\n\n```go\nfunc AssertFileExists(t testRunner, file string, msg ...any)\n```\n\nAssertFileExists asserts that a file exists.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertFileExists(t, \"./test.txt\")\n    testza.AssertFileExists(t, \"./config.yaml\", \"the config file is missing\")\n\n#### AssertGreater\n\n```go\nfunc AssertGreater(t testRunner, object1, object2 any, msg ...any)\n```\n\nAssertGreater asserts that the first object is greater than the second.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertGreater(t, 5, 1)\n    testza.AssertGreater(t, 10, -10)\n\n#### AssertGreaterOrEqual\n\n```go\nfunc AssertGreaterOrEqual(t testRunner, object1, object2 interface{}, msg ...interface{})\n```\n\nAssertGreaterOrEqual asserts that the first object is greater than or equal\nto the second.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertGreaterOrEqual(t, 5, 1)\n    testza.AssertGreaterOrEqual(t, 10, -10)\n\ntestza.AssertGreaterOrEqual(t, 10, 10)\n\n#### AssertImplements\n\n```go\nfunc AssertImplements(t testRunner, interfaceObject, object any, msg ...any)\n```\n\nAssertImplements asserts that an objects implements an interface.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertImplements(t, (*YourInterface)(nil), new(YourObject))\n    testza.AssertImplements(t, (*fmt.Stringer)(nil), new(types.Const)) =\u003e pass\n\n#### AssertInRange\n\n```go\nfunc AssertInRange[T number](t testRunner, value T, min T, max T, msg ...any)\n```\n\nAssertInRange asserts that the value is in the range.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertInRange(t, 5, 1, 10)\n\n#### AssertIncreasing\n\n```go\nfunc AssertIncreasing(t testRunner, object any, msg ...any)\n```\n\nAssertIncreasing asserts that the values in a slice are increasing. the test\nfails if the values are not in a slice or if the values are not comparable.\n\nValid input kinds are: []int, []int8, []int16, []int32, []int64, []uint,\n[]uint8, []uint16, []uint32, []uint64, []float32, []float64.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertIncreasing(t, []int{1, 2, 137, 1000})\n    testza.AssertIncreasing(t, []float32{-10.3, 0.1, 7, 13.5})\n\n#### AssertKindOf\n\n```go\nfunc AssertKindOf(t testRunner, expectedKind reflect.Kind, object any, msg ...any)\n```\n\nAssertKindOf asserts that the object is a type of kind exptectedKind.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertKindOf(t, reflect.Slice, []int{1,2,3})\n    testza.AssertKindOf(t, reflect.Slice, []string{\"Hello\", \"World\"})\n    testza.AssertKindOf(t, reflect.Int, 1337)\n    testza.AssertKindOf(t, reflect.Bool, true)\n    testza.AssertKindOf(t, reflect.Map, map[string]bool{})\n\n#### AssertLen\n\n```go\nfunc AssertLen(t testRunner, object any, length int, msg ...any)\n```\n\nAssertLen asserts that the length of an object is equal to the given length.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertLen(t, \"abc\", 3)\n    testza.AssertLen(t, \"Assert\", 6)\n    testza.AssertLen(t, []int{1, 2, 1337, 25}, 4)\n    testza.AssertLen(t, map[string]int{\"asd\": 1, \"test\": 1337}, 2)\n\n#### AssertLess\n\n```go\nfunc AssertLess(t testRunner, object1, object2 any, msg ...any)\n```\n\nAssertLess asserts that the first object is less than the second.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertLess(t, 1, 5)\n    testza.AssertLess(t, -10, 10)\n\n#### AssertLessOrEqual\n\n```go\nfunc AssertLessOrEqual(t testRunner, object1, object2 interface{}, msg ...interface{})\n```\n\nAssertLessOrEqual asserts that the first object is less than or equal to the\nsecond.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertLessOrEqual(t, 1, 5)\n    testza.AssertLessOrEqual(t, -10, 10)\n    testza.AssertLessOrEqual(t, 1, 1)\n\n#### AssertNil\n\n```go\nfunc AssertNil(t testRunner, object any, msg ...any)\n```\n\nAssertNil asserts that an object is nil.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNil(t, nil)\n\n#### AssertNoDirExists\n\n```go\nfunc AssertNoDirExists(t testRunner, dir string, msg ...any)\n```\n\nAssertNoDirExists asserts that a directory does not exists. The test will\npass, if the path points to a file, as a directory with the same name,\ncannot exist.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNoDirExists(t, \"FolderName\")\n\n#### AssertNoError\n\n```go\nfunc AssertNoError(t testRunner, err error, msg ...any)\n```\n\nAssertNoError asserts that an error is nil.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    err := nil\n    testza.AssertNoError(t, err)\n\n#### AssertNoFileExists\n\n```go\nfunc AssertNoFileExists(t testRunner, file string, msg ...any)\n```\n\n\n\n#### AssertNoSubset\n\n```go\nfunc AssertNoSubset(t testRunner, list any, subset any, msg ...any)\n```\n\nAssertNoSubset asserts that the second parameter is not a subset of the\nlist. The order is irrelevant.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNoSubset(t, []int{1, 2, 3}, []int{1, 7})\n    testza.AssertNoSubset(t, []string{\"Hello\", \"World\", \"Test\"}, []string{\"Test\", \"John\"})\n\n#### AssertNotCompletesIn\n\n```go\nfunc AssertNotCompletesIn(t testRunner, duration time.Duration, f func(), msg ...any)\n```\n\nAssertNotCompletesIn asserts that a function does not complete in a given\ntime. Use this function to test that functions do not complete to quickly.\nFor example if your database connection completes in under a millisecond,\nthere might be something wrong.\n\nNOTE: Every system takes a different amount of time to complete a function.\nDo not set the duration too high, if you want consistent results.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotCompletesIn(t, 2 * time.Second, func() {\n    \t// some code that should take more than 2 seconds...\n    \ttime.Sleep(3 * time.Second)\n    }) // =\u003e PASS\n\n#### AssertNotContains\n\n```go\nfunc AssertNotContains(t testRunner, object, element any, msg ...any)\n```\n\nAssertNotContains asserts that a string/list/array/slice/map does not\ncontain the specified element.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotContains(t, []string{\"Hello\", \"World\"}, \"Spaceship\")\n    testza.AssertNotContains(t, \"Hello, World!\", \"Spaceship\")\n\n#### AssertNotEqual\n\n```go\nfunc AssertNotEqual(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertNotEqual asserts that two objects are not equal.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotEqual(t, true, false)\n    testza.AssertNotEqual(t, \"Hello\", \"World\")\n\n#### AssertNotEqualValues\n\n```go\nfunc AssertNotEqualValues(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertNotEqualValues asserts that two objects do not have equal values.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotEqualValues(t, []int{1,2}, []int{3,4})\n\nComparing struct values:\n\n    person1 := Person{\n      Name:   \"Marvin Wendt\",\n      Age:    20,\n      Gender: \"male\",\n    }\n\n    person2 := Person{\n      Name:   \"Marvin Wendt\",\n      Age:    20,\n      Gender: \"female\", // \u003c-- CHANGED\n    }\n\n    testza.AssertNotEqualValues(t, person1, person2)\n\n#### AssertNotErrorIs\n\n```go\nfunc AssertNotErrorIs(t testRunner, err, target error, msg ...any)\n```\n\nAssertNotErrorIs\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    var testErr = errors.New(\"hello world\")\n    var test2Err = errors.New(\"hello world 2\")\n    var testErrWrapped = fmt.Errorf(\"test err: %w\", testErr)\n    testza.AssertNotErrorIs(t, testErrWrapped, test2Err)\n\n#### AssertNotImplements\n\n```go\nfunc AssertNotImplements(t testRunner, interfaceObject, object any, msg ...any)\n```\n\nAssertNotImplements asserts that an object does not implement an interface.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotImplements(t, (*YourInterface)(nil), new(YourObject))\n    testza.AssertNotImplements(t, (*fmt.Stringer)(nil), new(types.Const)) =\u003e fail, because types.Const does implement fmt.Stringer.\n\n#### AssertNotInRange\n\n```go\nfunc AssertNotInRange[T number](t testRunner, value T, min T, max T, msg ...any)\n```\n\nAssertNotInRange asserts that the value is not in the range.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotInRange(t, 5, 1, 10)\n\n#### AssertNotKindOf\n\n```go\nfunc AssertNotKindOf(t testRunner, kind reflect.Kind, object any, msg ...any)\n```\n\nAssertNotKindOf asserts that the object is not a type of kind `kind`.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotKindOf(t, reflect.Slice, \"Hello, World\")\n    testza.AssertNotKindOf(t, reflect.Slice, true)\n    testza.AssertNotKindOf(t, reflect.Int, 13.37)\n    testza.AssertNotKindOf(t, reflect.Bool, map[string]bool{})\n    testza.AssertNotKindOf(t, reflect.Map, false)\n\n#### AssertNotNil\n\n```go\nfunc AssertNotNil(t testRunner, object any, msg ...any)\n```\n\nAssertNotNil asserts that an object is not nil.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotNil(t, true)\n    testza.AssertNotNil(t, \"Hello, World!\")\n    testza.AssertNotNil(t, 0)\n\n#### AssertNotNumeric\n\n```go\nfunc AssertNotNumeric(t testRunner, object any, msg ...any)\n```\n\nAssertNotNumeric checks if the object is not a numeric type. Numeric types\nare: Int, Int8, Int16, Int32, Int64, Float32, Float64, Uint, Uint8, Uint16,\nUint32, Uint64, Complex64 and Complex128.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotNumeric(t, true)\n    testza.AssertNotNumeric(t, \"123\")\n\n#### AssertNotPanics\n\n```go\nfunc AssertNotPanics(t testRunner, f func(), msg ...any)\n```\n\nAssertNotPanics asserts that a function does not panic.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotPanics(t, func() {\n    \t// some code that does not call a panic...\n    }) // =\u003e PASS\n\n#### AssertNotRegexp\n\n```go\nfunc AssertNotRegexp(t testRunner, regex any, txt any, msg ...any)\n```\n\nAssertNotRegexp asserts that a string does not match a given regexp.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotRegexp(t, \"ab.*\", \"Hello, World!\")\n\n#### AssertNotSameElements\n\n```go\nfunc AssertNotSameElements(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertNotSameElements asserts that two slices contains same elements\n(including pointers). The order is irrelevant.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n     testza.AssertNotSameElements(t, []string{\"Hello\", \"World\"}, []string{\"Hello\", \"World\", \"World\"})\n     testza.AssertNotSameElements(t, []int{1,2}, []int{1,2,3})\n\n     type A struct {\n    \t  a string\n     }\n     testza.AssertNotSameElements(t, []*A{{a: \"A\"}, {a: \"B\"}, {a: \"C\"}}, []*A{{a: \"A\"}, {a: \"B\"}, {a: \"C\"}, {a: \"D\"}})\n\n#### AssertNotUnique\n\n```go\nfunc AssertNotUnique[elementType comparable](t testRunner, list []elementType, msg ...any)\n```\n\nAssertNotUnique asserts that the elements in a list are not unique.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotUnique(t, []int{1, 2, 3, 3})\n\n#### AssertNotZero\n\n```go\nfunc AssertNotZero(t testRunner, value any, msg ...any)\n```\n\nAssertNotZero asserts that the value is not the zero value for it's type.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNotZero(t, 1337)\n    testza.AssertNotZero(t, true)\n    testza.AssertNotZero(t, \"Hello, World\")\n\n#### AssertNumeric\n\n```go\nfunc AssertNumeric(t testRunner, object any, msg ...any)\n```\n\nAssertNumeric asserts that the object is a numeric type. Numeric types are:\nInt, Int8, Int16, Int32, Int64, Float32, Float64, Uint, Uint8, Uint16,\nUint32, Uint64, Complex64 and Complex128.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertNumeric(t, 123)\n    testza.AssertNumeric(t, 1.23)\n    testza.AssertNumeric(t, uint(123))\n\n#### AssertPanics\n\n```go\nfunc AssertPanics(t testRunner, f func(), msg ...any)\n```\n\nAssertPanics asserts that a function panics.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertPanics(t, func() {\n    \t// ...\n    \tpanic(\"some panic\")\n    }) // =\u003e PASS\n\n#### AssertRegexp\n\n```go\nfunc AssertRegexp(t testRunner, regex any, txt any, msg ...any)\n```\n\nAssertRegexp asserts that a string matches a given regexp.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertRegexp(t, \"^a.*c$\", \"abc\")\n\n#### AssertSameElements\n\n```go\nfunc AssertSameElements(t testRunner, expected any, actual any, msg ...any)\n```\n\nAssertSameElements asserts that two slices contains same elements (including\npointers). The order is irrelevant.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n     testza.AssertSameElements(t, []string{\"Hello\", \"World\"}, []string{\"Hello\", \"World\"})\n     testza.AssertSameElements(t, []int{1,2,3}, []int{1,2,3})\n     testza.AssertSameElements(t, []int{1,2}, []int{2,1})\n\n     type A struct {\n    \t  a string\n     }\n     testza.AssertSameElements(t, []*A{{a: \"A\"}, {a: \"B\"}, {a: \"C\"}}, []*A{{a: \"A\"}, {a: \"B\"}, {a: \"C\"}})\n\n#### AssertSubset\n\n```go\nfunc AssertSubset(t testRunner, list any, subset any, msg ...any)\n```\n\nAssertSubset asserts that the second parameter is a subset of the list.\nThe order is irrelevant.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertSubset(t, []int{1, 2, 3}, []int{1, 2})\n    testza.AssertSubset(t, []string{\"Hello\", \"World\", \"Test\"}, []string{\"Test\", \"World\"})\n\n#### AssertTestFails\n\n```go\nfunc AssertTestFails(t testRunner, test func(t TestingPackageWithFailFunctions), msg ...any)\n```\n\nAssertTestFails asserts that a unit test fails. A unit test fails if one of\nthe following methods is called in the test function: Error, Errorf, Fail,\nFailNow, Fatal, Fatalf\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertTestFails(t, func(t testza.TestingPackageWithFailFunctions) {\n    \ttestza.AssertTrue(t, false)\n    }) // =\u003e Pass\n\n    testza.AssertTestFails(t, func(t testza.TestingPackageWithFailFunctions) {\n    \t// ...\n    \tt.Fail() // Or any other failing method.\n    }) // =\u003e Pass\n\n#### AssertTrue\n\n```go\nfunc AssertTrue(t testRunner, value any, msg ...any)\n```\n\nAssertTrue asserts that an expression or object resolves to true.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertTrue(t, true)\n    testza.AssertTrue(t, 1 == 1)\n    testza.AssertTrue(t, 2 != 3)\n    testza.AssertTrue(t, 1 \u003e 0 \u0026\u0026 4 \u003c 5)\n\n#### AssertUnique\n\n```go\nfunc AssertUnique[elementType comparable](t testRunner, list []elementType, msg ...any)\n```\n\nAssertUnique asserts that the list contains only unique elements. The order\nis irrelevant.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertUnique(t, []int{1, 2, 3})\n    testza.AssertUnique(t, []string{\"Hello\", \"World\", \"!\"})\n\n#### AssertZero\n\n```go\nfunc AssertZero(t testRunner, value any, msg ...any)\n```\n\nAssertZero asserts that the value is the zero value for it's type.\n\nWhen using a custom message, the same formatting as with fmt.Sprintf() is\nused.\n\nExample:\n\n    testza.AssertZero(t, 0)\n    testza.AssertZero(t, false)\n    testza.AssertZero(t, \"\")\n\n### Capture\n\n#### CaptureStderr\n\n```go\nfunc CaptureStderr(capture func(w io.Writer) error) (string, error)\n```\n\nCaptureStderr captures everything written to stderr from a specific\nfunction. You can use this method in tests, to validate that your functions\nwrites a string to the terminal.\n\nExample:\n\n    stderr, err := testza.CaptureStderr(func(w io.Writer) error {\n    \t_, err := fmt.Fprint(os.Stderr, \"Hello, World!\")\n    \ttestza.AssertNoError(t, err)\n    \treturn nil\n    })\n\n    testza.AssertNoError(t, err)\n    testza.AssertEqual(t, \"Hello, World!\", stderr)\n\n#### CaptureStdout\n\n```go\nfunc CaptureStdout(capture func(w io.Writer) error) (string, error)\n```\n\nCaptureStdout captures everything written to stdout from a specific\nfunction. You can use this method in tests, to validate that your functions\nwrites a string to the terminal.\n\nExample:\n\n    stdout, err := testza.CaptureStdout(func(w io.Writer) error {\n    \tfmt.Println(\"Hello, World!\")\n    \treturn nil\n    })\n\n    testza.AssertNoError(t, err)\n    testza.AssertEqual(t, \"Hello, World!\", stdout)\n\n#### CaptureStdoutAndStderr\n\n```go\nfunc CaptureStdoutAndStderr(capture func(stdoutWriter, stderrWriter io.Writer) error) (stdout, stderr string, err error)\n```\n\nCaptureStdoutAndStderr captures everything written to stdout and stderr from\na specific function. You can use this method in tests, to validate that your\nfunctions writes a string to the terminal.\n\nExample:\n\n    stdout, stderr, err := testza.CaptureStdoutAndStderr(func(stdoutWriter, stderrWriter io.Writer) error {\n    \tfmt.Fprint(os.Stdout, \"Hello\")\n    \tfmt.Fprint(os.Stderr, \"World\")\n    \treturn nil\n    })\n\n    testza.AssertNoError(t, err)\n    testza.AssertEqual(t, \"Hello\", stdout)\n    testza.AssertEqual(t, \"World\", stderr)\n\n### Fuzz Booleans\n\n#### FuzzBoolFull\n\n```go\nfunc FuzzBoolFull() []bool\n```\n\nFuzzBoolFull returns true and false in a boolean slice.\n\n### Fuzz Float64s\n\n#### FuzzFloat64Full\n\n```go\nfunc FuzzFloat64Full() (floats []float64)\n```\n\nFuzzFloat64Full returns a combination of every float64 testset and some\nrandom float64s (positive and negative).\n\n#### FuzzFloat64GenerateRandomNegative\n\n```go\nfunc FuzzFloat64GenerateRandomNegative(count int, min float64) (floats []float64)\n```\n\nFuzzFloat64GenerateRandomNegative generates random negative integers with\na minimum of min. If the minimum is positive, it will be converted to a\nnegative number. If it is set to 0, there is no limit.\n\n#### FuzzFloat64GenerateRandomPositive\n\n```go\nfunc FuzzFloat64GenerateRandomPositive(count int, max float64) (floats []float64)\n```\n\nFuzzFloat64GenerateRandomPositive generates random positive integers with\na maximum of max. If the maximum is 0, or below, the maximum will be set to\nmath.MaxInt64.\n\n#### FuzzFloat64GenerateRandomRange\n\n```go\nfunc FuzzFloat64GenerateRandomRange(count int, min, max float64) (floats []float64)\n```\n\nFuzzFloat64GenerateRandomRange generates random positive integers with a\nmaximum of max. If the maximum is 0, or below, the maximum will be set to\nmath.MaxInt64.\n\n### Fuzz Integers\n\n#### FuzzIntFull\n\n```go\nfunc FuzzIntFull() (ints []int)\n```\n\nFuzzIntFull returns a combination of every integer testset and some random\nintegers (positive and negative).\n\n#### FuzzIntGenerateRandomNegative\n\n```go\nfunc FuzzIntGenerateRandomNegative(count, min int) (ints []int)\n```\n\nFuzzIntGenerateRandomNegative generates random negative integers with a\nminimum of min. If the minimum is 0, or above, the maximum will be set to\nmath.MinInt64.\n\n#### FuzzIntGenerateRandomPositive\n\n```go\nfunc FuzzIntGenerateRandomPositive(count, max int) (ints []int)\n```\n\nFuzzIntGenerateRandomPositive generates random positive integers with a\nmaximum of max. If the maximum is 0, or below, the maximum will be set to\nmath.MaxInt64.\n\n#### FuzzIntGenerateRandomRange\n\n```go\nfunc FuzzIntGenerateRandomRange(count, min, max int) (ints []int)\n```\n\nFuzzIntGenerateRandomRange generates random integers with a range of min to\nmax.\n\n### Fuzz Strings\n\n#### FuzzStringEmailAddresses\n\n```go\nfunc FuzzStringEmailAddresses() []string\n```\n\nFuzzStringEmailAddresses returns a test set with valid email addresses.\nThe addresses may look like they are invalid, but they are all conform to\nRFC 2822 and could be used. You can use this test set to test your email\nvalidation process.\n\n#### FuzzStringEmpty\n\n```go\nfunc FuzzStringEmpty() []string\n```\n\nFuzzStringEmpty returns a test set with a single empty string.\n\n#### FuzzStringFull\n\n```go\nfunc FuzzStringFull() (ret []string)\n```\n\nFuzzStringFull contains all string test sets plus ten generated random\nstrings. This test set is huge and should only be used if you want to make\nsure that no string, at all, can crash a process.\n\n#### FuzzStringGenerateRandom\n\n```go\nfunc FuzzStringGenerateRandom(count, length int) (result []string)\n```\n\nFuzzStringGenerateRandom returns random strings in a test set.\n\n#### FuzzStringHtmlTags\n\n```go\nfunc FuzzStringHtmlTags() []string\n```\n\nFuzzStringHtmlTags returns a test set with different html tags.\n\nExample:\n  - \u003cscript\u003e\n  - \u003cscript\u003ealert('XSS')\u003c/script\u003e\n  - \u003ca href=\"https://github.com/MarvinJWendt/testza\"\u003elink\u003c/a\u003e\n\n#### FuzzStringLong\n\n```go\nfunc FuzzStringLong() (testSet []string)\n```\n\nFuzzStringLong returns a test set with long random strings. Returns: [0]:\nRandom string (length: 25) [1]: Random string (length: 50) [2]: Random\nstring (length: 100) [3]: Random string (length: 1,000) [4]: Random string\n(length: 100,000)\n\n#### FuzzStringNumeric\n\n```go\nfunc FuzzStringNumeric() []string\n```\n\nFuzzStringNumeric returns a test set with strings that are numeric.\nThe highest number in here is \"9223372036854775807\", which is equal to the\nmaxmim int64.\n\n#### FuzzStringUsernames\n\n```go\nfunc FuzzStringUsernames() []string\n```\n\nFuzzStringUsernames returns a test set with usernames.\n\n### Fuzz Utils\n\n#### FuzzUtilDistinctSet\n\n```go\nfunc FuzzUtilDistinctSet[setType comparable](testSet []setType) []setType\n```\n\nFuzzUtilDistinctSet returns a set with removed duplicates.\n\nExample:\n\n    uniqueSet := testza.FuzzUtilDistinctSet([]string{\"A\", \"C\", \"A\", \"B\", \"A\", \"B\", \"C\"})\n    // uniqueSet =\u003e []string{\"A\", \"C\", \"B\"}\n\n#### FuzzUtilLimitSet\n\n```go\nfunc FuzzUtilLimitSet[setType any](testSet []setType, max int) []setType\n```\n\nFuzzUtilLimitSet returns a random sample of a test set with a maximal size.\n\nExample:\n\n    limitedSet := testza.FuzzUtilLimitSet(testza.FuzzStringFull(), 10)\n\n#### FuzzUtilMergeSets\n\n```go\nfunc FuzzUtilMergeSets[setType any](sets ...[]setType) (merged []setType)\n```\n\nFuzzUtilMergeSets merges multiple test sets into one. All test sets must\nhave the same type.\n\nExample:\n\n    mergedSet := testza.FuzzUtilMergeSets(testza.FuzzIntGenerateRandomNegative(3, 0), testza.FuzzIntGenerateRandomPositive(2, 0))\n\n#### FuzzUtilModifySet\n\n```go\nfunc FuzzUtilModifySet[setType any](inputSet []setType, modifier func(index int, value setType) setType) (floats []setType)\n```\n\nFuzzUtilModifySet returns a modified version of a test set.\n\nExample:\n\n     modifiedSet := testza.FuzzUtilModifySet(testza.FuzzIntFull(), func(i int, value int) int {\n    \t\treturn i * 2 // double every value in the test set\n    \t})\n\n#### FuzzUtilRunTests\n\n```go\nfunc FuzzUtilRunTests[setType any](t testRunner, testSet []setType, testFunc func(t *testing.T, index int, f setType))\n```\n\nFuzzUtilRunTests runs a test for every value in a test set. You can use\nthe value as input parameter for your functions, to sanity test against\nmany different cases. This ensures that your functions have a correct error\nhandling and enables you to test against hundreds of cases easily.\n\nExample:\n\n    testza.FuzzUtilRunTests(t, testza.FuzzStringEmailAddresses(), func(t *testing.T, index int, emailAddress string) {\n    \t// Test logic\n    \t// err := YourFunction(emailAddress)\n    \t// testza.AssertNoError(t, err)\n    \t// ...\n    })\n\n### \n\n#### GetColorsEnabled\n\n```go\nfunc GetColorsEnabled() bool\n```\n\nGetColorsEnabled returns current value of ColorsEnabled setting.\nColorsEnabled controls if testza should print colored output.\n\n#### GetDiffContextLines\n\n```go\nfunc GetDiffContextLines() int\n```\n\nGetDiffContextLines returns current value of DiffContextLines setting.\nDiffContextLines setting controls how many lines are shown around a changed\ndiff line. If set to -1 it will show full diff.\n\n#### GetLineNumbersEnabled\n\n```go\nfunc GetLineNumbersEnabled() bool\n```\n\nGetLineNumbersEnabled returns current value of LineNumbersEnabled setting.\nLineNumbersEnabled controls if line numbers should be printed in failing\ntests.\n\n#### GetRandomSeed\n\n```go\nfunc GetRandomSeed() int64\n```\n\nGetRandomSeed returns current value of the random seed setting.\n\n#### GetShowStartupMessage\n\n```go\nfunc GetShowStartupMessage() bool\n```\n\nGetShowStartupMessage returns current value of showStartupMessage setting.\nshowStartupMessage setting controls if the startup message should be\nprinted.\n\n### Settings\n\n#### SetColorsEnabled\n\n```go\nfunc SetColorsEnabled(enabled bool)\n```\n\nSetColorsEnabled controls if testza should print colored output. You should\nuse this in the init() method of the package, which contains your tests.\n\n\u003e This setting can also be set by the command line flag\n--testza.disable-color.\n\nExample:\n\n    init() {\n      testza.SetColorsEnabled(false) // Disable colored output\n      testza.SetColorsEnabled(true)  // Enable colored output\n    }\n\n#### SetDiffContextLines\n\n```go\nfunc SetDiffContextLines(lines int)\n```\n\nSetDiffContextLines controls how many lines are shown around a changed diff\nline. If set to -1 it will show full diff. You should use this in the init()\nmethod of the package, which contains your tests.\n\n\u003e This setting can also be set by the command line flag\n--testza.diff-context-lines.\n\nExample:\n\n    init() {\n      testza.SetDiffContextLines(-1) // Show all diff lines\n      testza.SetDiffContextLines(3)  // Show 3 lines around every changed line\n    }\n\n#### SetLineNumbersEnabled\n\n```go\nfunc SetLineNumbersEnabled(enabled bool)\n```\n\nSetLineNumbersEnabled controls if line numbers should be printed in\nfailing tests. You should use this in the init() method of the package,\nwhich contains your tests.\n\n\u003e This setting can also be set by the command line flag\n--testza.disable-line-numbers.\n\nExample:\n\n    init() {\n      testza.SetLineNumbersEnabled(false) // Disable line numbers\n      testza.SetLineNumbersEnabled(true)  // Enable line numbers\n    }\n\n#### SetRandomSeed\n\n```go\nfunc SetRandomSeed(seed int64)\n```\n\nSetRandomSeed sets the seed for the random generator used in testza.\nUsing the same seed will result in the same random sequences each time and\nguarantee a reproducible test run. Use this setting, if you want a 100%\ndeterministic test. You should use this in the init() method of the package,\nwhich contains your tests.\n\n\u003e This setting can also be set by the command line flag --testza.seed.\n\nExample:\n\n    init() {\n      testza.SetRandomSeed(1337) // Set the seed to 1337\n      testza.SetRandomSeed(time.Now().UnixNano()) // Set the seed back to the current time (default | non-deterministic)\n    }\n\n#### SetShowStartupMessage\n\n```go\nfunc SetShowStartupMessage(show bool)\n```\n\nSetShowStartupMessage controls if the startup message should be printed.\nYou should use this in the init() method of the package, which contains your\ntests.\n\n\u003e This setting can also be set by the command line flag\n--testza.disable-startup-message.\n\nExample:\n\n    init() {\n      testza.SetShowStartupMessage(false) // Disable the startup message\n      testza.SetShowStartupMessage(true)  // Enable the startup message\n    }\n\n### Snapshot\n\n#### SnapshotCreate\n\n```go\nfunc SnapshotCreate(name string, snapshotObject any) error\n```\n\nSnapshotCreate creates a snapshot of an object, which can be validated\nin future test runs. Using this function directly will override\nprevious snapshots with the same name. You most likely want to use\nSnapshotCreateOrValidate.\n\nNOTICE: \\r\\n will be replaced with \\n to make the files consistent between\noperating systems.\n\nExample:\n\n    testza.SnapshotCreate(t.Name(), objectToBeSnapshotted)\n\n#### SnapshotCreateOrValidate\n\n```go\nfunc SnapshotCreateOrValidate(t testRunner, name string, object any, msg ...any) error\n```\n\nSnapshotCreateOrValidate creates a snapshot of an object which can be used\nin future test runs. It is good practice to name your snapshots the same\nas the test they are created in. You can do that automatically by using\nt.Name() as the second parameter, if you are using the inbuilt test system\nof Go. If a snapshot already exists, the function will not create a new one,\nbut validate the exisiting one. To re-create a snapshot, you can delete the\naccording file in /testdata/snapshots/.\n\nNOTICE: \\r\\n will be replaced with \\n to make the files consistent between\noperating systems.\n\nExample:\n\n    testza.SnapshotCreateOrValidate(t, t.Name(), object)\n    testza.SnapshotCreateOrValidate(t, t.Name(), object, \"Optional Message\")\n\n#### SnapshotValidate\n\n```go\nfunc SnapshotValidate(t testRunner, name string, actual any, msg ...any) error\n```\n\nSnapshotValidate validates an already exisiting snapshot of an object.\nYou most likely want to use SnapshotCreateOrValidate.\n\nNOTICE: \\r\\n will be replaced with \\n to make the files consistent between\noperating systems.\n\nExample:\n\n    testza.SnapshotValidate(t, t.Name(), objectToBeValidated)\n    testza.SnapshotValidate(t, t.Name(), objectToBeValidated, \"Optional message\")\n\n\n\u003c!-- docs:end --\u003e\n\n---\n\n\u003e Made with ❤️ by [@MarvinJWendt](https://github.com/MarvinJWendt) and contributors! |\n\u003e [MarvinJWendt.com](https://marvinjwendt.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarvinJWendt%2Ftestza","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMarvinJWendt%2Ftestza","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMarvinJWendt%2Ftestza/lists"}