summaryrefslogtreecommitdiff
path: root/android/util_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-11-09 18:47:40 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-11-09 18:47:40 +0000
commit4ade19fe9481a0b52a74b42a53834dcecf5ddb88 (patch)
treec5ae762b6674226dce5104e9a46479d85a2573f5 /android/util_test.go
parentc31b24977e8bc691a2bd60953f36106f14803f20 (diff)
parent611a2fbdd7a01bce4046db364f7af7000d69ffa1 (diff)
Merge changes I4d0b27ba,Ic48e9cf2 into main
* changes: Fix soong_ui file rlimits for go 1.21 Fix TestReverseSlice for go 1.21
Diffstat (limited to 'android/util_test.go')
-rw-r--r--android/util_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/android/util_test.go b/android/util_test.go
index 20161e52d..699135bfc 100644
--- a/android/util_test.go
+++ b/android/util_test.go
@@ -811,7 +811,7 @@ func TestReverseSlice(t *testing.T) {
if !reflect.DeepEqual(slice, testCase.expected) {
t.Errorf("expected %#v, got %#v", testCase.expected, slice)
}
- if slice != nil && unsafe.SliceData(testCase.in) == unsafe.SliceData(slice) {
+ if cap(slice) > 0 && unsafe.SliceData(testCase.in) == unsafe.SliceData(slice) {
t.Errorf("expected slices to have different backing arrays")
}
})