summaryrefslogtreecommitdiff
path: root/android/util_test.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-01-30 14:42:12 -0800
committer Cole Faust <colefaust@google.com> 2024-01-30 14:42:12 -0800
commitefc70122af0572b9421b49a359ddc3b37deb4f59 (patch)
treef84d91763364f3158e197986bb7598ccc0d19638 /android/util_test.go
parenta8a5f64222ccaf2fa805c1d87c3985ac640a352f (diff)
Use ordered interface from cmp package
I just learned this exists. Test: m nothing --no-skip-soong-tests Change-Id: Ic6f0d11c24b41b394b1760fcca9e0da53243e6d9
Diffstat (limited to 'android/util_test.go')
-rw-r--r--android/util_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/android/util_test.go b/android/util_test.go
index 699135bfc..8e73d835c 100644
--- a/android/util_test.go
+++ b/android/util_test.go
@@ -15,6 +15,7 @@
package android
import (
+ "cmp"
"fmt"
"reflect"
"strconv"
@@ -650,7 +651,7 @@ func BenchmarkFirstUniqueStrings(b *testing.B) {
}
}
-func testSortedKeysHelper[K Ordered, V any](t *testing.T, name string, input map[K]V, expected []K) {
+func testSortedKeysHelper[K cmp.Ordered, V any](t *testing.T, name string, input map[K]V, expected []K) {
t.Helper()
t.Run(name, func(t *testing.T) {
actual := SortedKeys(input)