{"modulePath":"github.com/Evolution404/simcore","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utesting\n\nPackage utesting provides a standalone replacement for package testing.\n\nThis package exists because package testing cannot easily be embedded into a standalone go program. It provides an API that mirrors the standard library testing API.\n\n## Functions\n\n```go\nfunc CountFailures(rr []Result) int\n```\nCountFailures returns the number of failed tests in the result slice.\n\n```go\nfunc Run(test Test) (bool, string)\n```\nRun executes a single test.\n\n## Types\n\n```go\ntype Result struct {\n\tName     string\n\tFailed   bool\n\tOutput   string\n\tDuration time.Duration\n}\n```\nResult is the result of a test execution.\n\n```go\nfunc RunTAP(tests []Test, report io.Writer) []Result\n```\nRunTAP runs the given tests and writes Test Anything Protocol output to the report writer.\n\n```go\nfunc RunTests(tests []Test, report io.Writer) []Result\n```\nRunTests executes all given tests in order and returns their results. If the report writer is non-nil, a test report is written to it in real time.\n\n```go\ntype T struct {\n\t// contains filtered or unexported fields\n}\n```\nT is the value given to the test function. The test can signal failures and log output by calling methods on this object.\n\n```go\nfunc (t *T) Error(vs ...interface{})\n```\nError is equivalent to Log followed by Fail.\n\n```go\nfunc (t *T) Errorf(format string, vs ...interface{})\n```\nErrorf is equivalent to Logf followed by Fail.\n\n```go\nfunc (t *T) Fail()\n```\nFail marks the test as having failed but continues execution.\n\n```go\nfunc (t *T) FailNow()\n```\nFailNow marks the test as having failed and stops its execution by calling runtime.Goexit (which then runs all deferred calls in the current goroutine).\n\n```go\nfunc (t *T) Failed() bool\n```\nFailed reports whether the test has failed.\n\n```go\nfunc (t *T) Fatal(vs ...interface{})\n```\nFatal is equivalent to Log followed by FailNow.\n\n```go\nfunc (t *T) Fatalf(format string, vs ...interface{})\n```\nFatalf is equivalent to Logf followed by FailNow.\n\n```go\nfunc (t *T) Helper()\n```\nHelper exists for compatibility with testing.T.\n\n```go\nfunc (t *T) Log(vs ...interface{})\n```\nLog formats its arguments using default formatting, analogous to Println, and records the text in the error log.\n\n```go\nfunc (t *T) Logf(format string, vs ...interface{})\n```\nLogf formats its arguments according to the format, analogous to Printf, and records the text in the error log. A final newline is added if not provided.\n\n```go\ntype Test struct {\n\tName string\n\tFn   func(*T)\n}\n```\nTest represents a single test.\n\n```go\nfunc MatchTests(tests []Test, expr string) []Test\n```\nMatchTests returns the tests whose name matches a regular expression.\n\n","path":"github.com/Evolution404/simcore/internal/utesting","name":"utesting","synopsis":"Package utesting provides a standalone replacement for package testing.","isRedistributable":true}
