summaryrefslogtreecommitdiff
path: root/android/test_asserts.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/test_asserts.go')
-rw-r--r--android/test_asserts.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/test_asserts.go b/android/test_asserts.go
index 5100abb79..e2df12fa9 100644
--- a/android/test_asserts.go
+++ b/android/test_asserts.go
@@ -31,6 +31,15 @@ func AssertBoolEquals(t *testing.T, message string, expected bool, actual bool)
}
}
+// AssertIntEquals 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 AssertIntEquals(t *testing.T, message string, expected int, actual int) {
+ t.Helper()
+ if actual != expected {
+ t.Errorf("%s: expected %d, actual %d", message, expected, actual)
+ }
+}
+
// AssertStringEquals 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 AssertStringEquals(t *testing.T, message string, expected string, actual string) {