- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for _SliceEqual (0.13 sec)
-
test/typeparam/maps.go
func TestKeys() { want := []int{1, 2, 4, 8} got1 := _Keys(m1) sort.Ints(got1) if !_SliceEqual(got1, want) { panic(fmt.Sprintf("_Keys(%v) = %v, want %v", m1, got1, want)) } got2 := _Keys(m2) sort.Ints(got2) if !_SliceEqual(got2, want) { panic(fmt.Sprintf("_Keys(%v) = %v, want %v", m2, got2, want)) } } func TestValues() { got1 := _Values(m1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 5.9K bytes - Viewed (0) -
test/typeparam/sets.go
package main import ( "fmt" "sort" ) // _Equal reports whether two slices are equal: the same length and all // elements equal. All floating point NaNs are considered equal. func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 { isNaN := func(f Elem) bool { return f != f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 5.7K bytes - Viewed (0) -
test/typeparam/chans.go
"context" "fmt" "runtime" "sort" "sync" "time" ) // _Equal reports whether two slices are equal: the same length and all // elements equal. All floating point NaNs are considered equal. func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 { isNaN := func(f Elem) bool { return f != f }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 8.4K bytes - Viewed (0) -
test/typeparam/graph.go
// license that can be found in the LICENSE file. package main import ( "errors" "fmt" ) // _SliceEqual reports whether two slices are equal: the same length and all // elements equal. All floating point NaNs are considered equal. func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) { return false } for i, v1 := range s1 { v2 := s2[i] if v1 != v2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 5.7K bytes - Viewed (0) -
test/typeparam/orderedmap.go
} got := gather(m.Iterate()) want := []int{'a', 'b', 'x'} if !_SliceEqual(got, want) { panic(fmt.Sprintf("Iterate returned %v, want %v", got, want)) } } func main() { TestMap() } // _Equal reports whether two slices are equal: the same length and all // elements equal. All floating point NaNs are considered equal. func _SliceEqual[Elem comparable](s1, s2 []Elem) bool { if len(s1) != len(s2) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 01 19:45:34 UTC 2022 - 7.1K bytes - Viewed (0)