Merge "Add AssertSame"
diff --git a/android/test_asserts.go b/android/test_asserts.go
index e2df12f..4b5e934 100644
--- a/android/test_asserts.go
+++ b/android/test_asserts.go
@@ -22,6 +22,15 @@
// This file contains general purpose test assert functions.
+// AssertSame checks if the expected and actual values are equal and if they are not then
+// it reports an error prefixed with the supplied message and including a reason for why it failed.
+func AssertSame(t *testing.T, message string, expected interface{}, actual interface{}) {
+ t.Helper()
+ if actual != expected {
+ t.Errorf("%s: expected:\n%#v\nactual:\n%#v", message, expected, actual)
+ }
+}
+
// AssertBoolEquals checks if the expected and actual values are equal and if they are not then it
// reports an error prefixed with the supplied message and including a reason for why it failed.
func AssertBoolEquals(t *testing.T, message string, expected bool, actual bool) {