- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestInterface (0.2 sec)
-
pkg/typemap/map_test.go
typemap.Set[TestInterface[string]](tm, TestStruct{Field: "interface"}) assert.Equal(t, typemap.Get[int](tm), ptr.Of(1)) assert.Equal(t, typemap.Get[int32](tm), ptr.Of(int32(2))) assert.Equal(t, typemap.Get[string](tm), ptr.Of("string")) assert.Equal(t, typemap.Get[*TestStruct](tm), ptr.Of(&TestStruct{Field: "pointer"}))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.5K bytes - Viewed (0) -
src/internal/fmtsort/sort_test.go
for _, test := range sortTests { got := sprint(test.data) if got != test.print { t.Errorf("%s: got %q, want %q", reflect.TypeOf(test.data), got, test.print) } } } func TestInterface(t *testing.T) { // A map containing multiple concrete types should be sorted by type, // then value. However, the relative ordering of types is unspecified, // so test this by checking the presence of sorted subgroups.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.9K bytes - Viewed (0)