aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ettle/strcase/assert.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/ettle/strcase/assert.go')
-rw-r--r--vendor/github.com/ettle/strcase/assert.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/ettle/strcase/assert.go b/vendor/github.com/ettle/strcase/assert.go
new file mode 100644
index 000000000..09344e40f
--- /dev/null
+++ b/vendor/github.com/ettle/strcase/assert.go
@@ -0,0 +1,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()
+ }
+}