diff options
author | 2020-11-25 14:29:50 -0800 | |
---|---|---|
committer | 2020-12-07 12:27:50 -0800 | |
commit | 96c44127d18119c5af1d08ec270a6f02ead2ff6e (patch) | |
tree | f43fb65bc82072607208969a3d553819885e9305 /android/util_test.go | |
parent | 2254cffd5380df7fda2d3eee0cf6e800ba5219c7 (diff) |
Reimplement DepSet as a wrapper around a generic implementation
Implement depSet as a generic depsets implementation using reflection,
and then make DepSet a type-safe wrapper around it. This will allow
additional wrappers for depsets that work with other types. All of
this can be replaced with generics once Go supports them.
Test: depset_test.go
Change-Id: Id9df17bcc76f6c1545e7eb498f298066cf8a7679
Diffstat (limited to 'android/util_test.go')
-rw-r--r-- | android/util_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/android/util_test.go b/android/util_test.go index 25b52ca03..fa26c77ac 100644 --- a/android/util_test.go +++ b/android/util_test.go @@ -593,6 +593,10 @@ func BenchmarkFirstUniqueStrings(b *testing.B) { name: "map", f: firstUniqueStringsMap, }, + { + name: "optimal", + f: FirstUniqueStrings, + }, } const maxSize = 1024 uniqueStrings := make([]string, maxSize) |