aboutsummaryrefslogtreecommitdiffstats
path: root/internal
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 /internal
parentFix typo (diff)
downloadcheckmate-c4f88b3173e34387147499f6f3a66b5595c7bf47.zip
Add check module, add some not functions, and remove a few test fns
Diffstat (limited to 'internal')
-rw-r--r--internal/cmtest/cmtest.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/internal/cmtest/cmtest.go b/internal/cmtest/cmtest.go
new file mode 100644
index 0000000..a3454c6
--- /dev/null
+++ b/internal/cmtest/cmtest.go
@@ -0,0 +1,39 @@
+package cmtest
+
+import (
+ "fmt"
+
+ "github.com/eugenetriguba/checkmate"
+)
+
+// MockT is a mock structure for capturing test outputs.
+type MockT struct {
+ checkmate.TestingT
+
+ FailNowCalled bool
+ FailCalled bool
+ Logs []string
+}
+
+func (m *MockT) FailNow() {
+ m.FailNowCalled = true
+}
+
+func (m *MockT) Fail() {
+ m.FailCalled = true
+}
+
+func (m *MockT) Log(args ...any) {
+ m.Logs = append(m.Logs, fmt.Sprint(args...))
+}
+
+// MockHelperT has a MockT and is also a helperT.
+type MockHelperT struct {
+ MockT
+
+ HelperCalled bool
+}
+
+func (m *MockHelperT) Helper() {
+ m.HelperCalled = true
+}