blob: 09344e40f2b2a53ce18715b5edcade68ab0474ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package strcase
// We use a lightweight replacement for testify/assert to reduce dependencies
// testingT interface allows us to test our assert functions
type testingT interface {
Logf(format string, args ...interface{})
Fail()
}
// assertTrue will fail if the value is not true
func assertTrue(t testingT, value bool) {
if !value {
t.Fail()
}
}
// assertEqual will fail if the two strings are not equal
func assertEqual(t testingT, expected, actual string) {
if expected != actual {
t.Logf("Expected: %s Actual: %s", expected, actual)
t.Fail()
}
}
|