- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for TestStruct (0.22 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"})) assert.Equal(t, typemap.Get[TestInterface[string]](tm), ptr.Of(TestInterface[string](TestStruct{Field: "interface"})))
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Apr 17 16:38:40 UTC 2024 - 1.5K bytes - Viewed (0) -
operator/pkg/util/reflect_test.go
} } func TestIsValueFuncs(t *testing.T) { testInt := int(42) testStruct := struct{}{} testSlice := []bool{} testMap := map[bool]bool{} var testNilSlice []bool var testNilMap map[bool]bool allValues := []any{nil, testInt, &testInt, testStruct, &testStruct, testNilSlice, testSlice, &testSlice, testNilMap, testMap, &testMap} tests := []struct { desc string
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Jul 25 19:30:47 UTC 2022 - 10.2K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/printers/json_test.go
"k8s.io/apimachinery/pkg/util/json" "k8s.io/client-go/kubernetes/scheme" ) var testData = TestStruct{ TypeMeta: metav1.TypeMeta{APIVersion: "foo/bar", Kind: "TestStruct"}, Key: "testValue", Map: map[string]int{"TestSubkey": 1}, StringList: []string{"a", "b", "c"}, IntList: []int{1, 2, 3}, } type TestStruct struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"`
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 12 15:46:12 UTC 2023 - 4K bytes - Viewed (0) -
pkg/config/model_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Apr 12 17:37:32 UTC 2024 - 7.9K bytes - Viewed (0) -
src/cmd/compile/internal/noder/lex_test.go
if !eq(got, tt.want) { t.Errorf("pragmaFields(%q) = %v; want %v", tt.in, got, tt.want) continue } } } func TestPragcgo(t *testing.T) { type testStruct struct { in string want []string } var tests = []testStruct{ {`go:cgo_export_dynamic local`, []string{`cgo_export_dynamic`, `local`}}, {`go:cgo_export_dynamic local remote`, []string{`cgo_export_dynamic`, `local`, `remote`}},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Dec 23 06:39:06 UTC 2020 - 3.6K bytes - Viewed (0) -
src/unique/handle_test.go
testHandle[testStringStruct](t, testStringStruct{"x"}) testHandle[testStringStructArrayStruct](t, testStringStructArrayStruct{ s: [2]testStringStruct{testStringStruct{"y"}, testStringStruct{"z"}}, }) testHandle[testStruct](t, testStruct{0.5, "184"}) } func testHandle[T comparable](t *testing.T, value T) { name := reflect.TypeFor[T]().Name() t.Run(fmt.Sprintf("%s/%#v", name, value), func(t *testing.T) { t.Parallel()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 2.5K bytes - Viewed (0) -
src/testing/quick/quick_test.go
func fString(a string) string { return a } type TestStringAlias string func fStringAlias(a TestStringAlias) TestStringAlias { return a } type TestStruct struct { A int B string } func fStruct(a TestStruct) TestStruct { return a } type TestStructAlias TestStruct func fStructAlias(a TestStructAlias) TestStructAlias { return a } func fUint16(a uint16) uint16 { return a } type TestUint16Alias uint16
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 12:54:00 UTC 2019 - 9K bytes - Viewed (0) -
src/unique/clone_test.go
testCloneSeq[testStringArray](t, cSeq(0, 2*goarch.PtrSize, 4*goarch.PtrSize)) testCloneSeq[testStringStruct](t, cSeq(0)) testCloneSeq[testStringStructArrayStruct](t, cSeq(0, 2*goarch.PtrSize)) testCloneSeq[testStruct](t, cSeq(8)) } func cSeq(stringOffsets ...uintptr) cloneSeq { return cloneSeq{stringOffsets: stringOffsets} } func testCloneSeq[T any](t *testing.T, want cloneSeq) { typName := reflect.TypeFor[T]().Name()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 18:14:07 UTC 2024 - 1K bytes - Viewed (0) -
src/encoding/asn1/marshal_test.go
Marshal(test.in) } } } func TestSetEncoder(t *testing.T) { testStruct := struct { Strings []string `asn1:"set"` }{ Strings: []string{"a", "aa", "b", "bb", "c", "cc"}, } // Expected ordering of the SET should be: // a, b, c, aa, bb, cc output, err := Marshal(testStruct) if err != nil { t.Errorf("%v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 10K bytes - Viewed (0) -
src/reflect/all_test.go
} if got, want := f.IsExported(), test.exported; got != want { t.Errorf("%s: Field(%d).IsExported = %v, want %v", name, test.index, got, want) } } } checkPkgPath("testStruct", []pkgpathTest{ {[]int{0}, "", false, true}, // Exported {[]int{1}, "reflect_test", false, false}, // unexported {[]int{2}, "", true, true}, // OtherPkgFields
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 218.8K bytes - Viewed (0)