aboutsummaryrefslogtreecommitdiffstats
path: root/doc.go
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2024-02-01 22:34:52 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2024-02-01 22:34:52 -0500
commitc4f88b3173e34387147499f6f3a66b5595c7bf47 (patch)
treeb12eea8e762b9ca62a52c25fdb928e2f821ac504 /doc.go
parentFix typo (diff)
downloadcheckmate-c4f88b3173e34387147499f6f3a66b5595c7bf47.zip
Add check module, add some not functions, and remove a few test fns
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc.go b/doc.go
new file mode 100644
index 0000000..a1ef74b
--- /dev/null
+++ b/doc.go
@@ -0,0 +1,24 @@
+// Checkmate is a library designed to enhance the testing experience by providing a
+// set of assertion functions. With Go, there is no built-in assertion library which
+// can make writing tests feel more verbose than it needs to be, so Checkmate aims to
+// fill that gap.
+//
+// This library is divided into two different packages. It provides a `check` package and an
+// `assert` package. The difference between them is that the functions inside of the `assert`
+// package will immediately fail the test on an assertion failure. However, the functions inside
+// of the `check` package will mark the test as failed and return a boolean result, however, they
+// will continue execution until the test has finished. Outside of those two differences, the
+// API and behavior is the same between them.
+//
+// Furthermore, any of the assertion of check package will accept a variadic argument at the
+// end called `msgAndArgs`. This allows the caller to pass in their own custom message on test
+// failure along with any arguments for the message if any format placeholders were used.
+package checkmate
+
+// The subset of testing.T which is used by the
+// checkmate package.
+type TestingT interface {
+ Log(args ...any)
+ Fail()
+ FailNow()
+}