Lines Matching refs:struct
25 var appendPropertiesTestCases = []struct {
37 in1: &struct{ B1, B2, B3, B4 bool }{
43 in2: &struct{ B1, B2, B3, B4 bool }{
49 out: &struct{ B1, B2, B3, B4 bool }{
58 in1: &struct{ B1, B2, B3, B4 bool }{
64 in2: &struct{ B1, B2, B3, B4 bool }{
70 out: &struct{ B1, B2, B3, B4 bool }{
80 in1: &struct{ S string }{
83 in2: &struct{ S string }{
86 out: &struct{ S string }{
92 in1: &struct{ S string }{
95 in2: &struct{ S string }{
98 out: &struct{ S string }{
105 in1: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
116 in2: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
127 out: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
141 in1: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
152 in2: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
163 out: &struct{ B1, B2, B3, B4, B5, B6, B7, B8, B9 *bool }{
178 in1: &struct{ S1, S2, S3, S4 *string }{
182 in2: &struct{ S1, S2, S3, S4 *string }{
186 out: &struct{ S1, S2, S3, S4 *string }{
195 in1: &struct{ S1, S2, S3, S4 *string }{
199 in2: &struct{ S1, S2, S3, S4 *string }{
203 out: &struct{ S1, S2, S3, S4 *string }{
213 in1: &struct{ S []string }{
216 in2: &struct{ S []string }{
219 out: &struct{ S []string }{
225 in1: &struct{ S []string }{
228 in2: &struct{ S []string }{
231 out: &struct{ S []string }{
238 in1: &struct{ S1, S2 []string }{
242 in2: &struct{ S1, S2 []string }{
246 out: &struct{ S1, S2 []string }{
253 in1: &struct{ S1, S2 []string }{
257 in2: &struct{ S1, S2 []string }{
261 out: &struct{ S1, S2 []string }{
269 in1: &struct{ S1, S2, S3 []string }{
272 in2: &struct{ S1, S2, S3 []string }{
275 out: &struct{ S1, S2, S3 []string }{
283 in1: &struct{ S1, S2, S3 []string }{
286 in2: &struct{ S1, S2, S3 []string }{
289 out: &struct{ S1, S2, S3 []string }{
298 in1: &struct{ S *struct{ S string } }{
299 S: &struct{ S string }{
303 in2: &struct{ S *struct{ S string } }{
304 S: &struct{ S string }{
308 out: &struct{ S *struct{ S string } }{
309 S: &struct{ S string }{
316 in1: &struct{ S *struct{ S string } }{
317 S: &struct{ S string }{
321 in2: &struct{ S *struct{ S string } }{
322 S: &struct{ S string }{
326 out: &struct{ S *struct{ S string } }{
327 S: &struct{ S string }{
335 in1: &struct{ S interface{} }{
336 S: &struct{ S string }{
340 in2: &struct{ S interface{} }{
341 S: &struct{ S string }{
345 out: &struct{ S interface{} }{
346 S: &struct{ S string }{
353 in1: &struct{ S interface{} }{
354 S: &struct{ S string }{
358 in2: &struct{ S interface{} }{
359 S: &struct{ S string }{
363 out: &struct{ S interface{} }{
364 S: &struct{ S string }{
372 in1: &struct{ s string }{
375 in2: &struct{ s string }{
378 out: &struct{ s string }{
383 // Empty struct
384 in1: &struct{}{},
385 in2: &struct{}{},
386 out: &struct{}{},
390 in1: &struct{ S interface{} }{
393 in2: &struct{ S interface{} }{
396 out: &struct{ S interface{} }{
402 in1: &struct{ S *struct{} }{
405 in2: &struct{ S *struct{} }{
408 out: &struct{ S *struct{} }{
413 // Anonymous struct
414 in1: &struct {
416 Nested struct{ EmbeddedStruct }
421 Nested: struct{ EmbeddedStruct }{
427 in2: &struct {
429 Nested struct{ EmbeddedStruct }
434 Nested: struct{ EmbeddedStruct }{
440 out: &struct {
442 Nested struct{ EmbeddedStruct }
447 Nested: struct{ EmbeddedStruct }{
456 in1: &struct {
458 Nested struct{ EmbeddedInterface }
460 EmbeddedInterface: &struct{ S string }{
463 Nested: struct{ EmbeddedInterface }{
464 EmbeddedInterface: &struct{ S string }{
469 in2: &struct {
471 Nested struct{ EmbeddedInterface }
473 EmbeddedInterface: &struct{ S string }{
476 Nested: struct{ EmbeddedInterface }{
477 EmbeddedInterface: &struct{ S string }{
482 out: &struct {
484 Nested struct{ EmbeddedInterface }
486 EmbeddedInterface: &struct{ S string }{
489 Nested: struct{ EmbeddedInterface }{
490 EmbeddedInterface: &struct{ S string }{
501 in1: struct{}{},
502 err: errors.New("expected pointer to struct, got struct {}"),
503 out: struct{}{},
507 in1: &struct{}{},
508 in2: struct{}{},
509 err: errors.New("expected pointer to struct, got struct {}"),
510 out: &struct{}{},
513 // Non-struct in1
515 err: errors.New("expected pointer to struct, got *[]string"),
519 // Non-struct in2
520 in1: &struct{}{},
522 err: errors.New("expected pointer to struct, got *[]string"),
523 out: &struct{}{},
527 in1: &struct{ A string }{
530 in2: &struct{ B string }{
533 out: &struct{ A string }{
536 err: errors.New("expected matching types for dst and src, got *struct { A string } and *struct { B string }"),
540 in1: &struct{ I int }{
543 in2: &struct{ I int }{
546 out: &struct{ I int }{
553 in1: &struct{ S interface{} }{
554 S: &struct{ S string }{
558 in2: &struct{ S interface{} }{
561 out: &struct{ S interface{} }{
562 S: &struct{ S string }{
570 in1: &struct{ S interface{} }{
571 S: &struct{ A string }{
575 in2: &struct{ S interface{} }{
576 S: &struct{ B string }{
580 out: &struct{ S interface{} }{
581 S: &struct{ A string }{
585 err: extendPropertyErrorf("s", "mismatched types struct { A string } and struct { B string }"),
589 in1: &struct{ S interface{} }{
590 S: struct{ S string }{
594 in2: &struct{ S interface{} }{
595 S: struct{ S string }{
599 out: &struct{ S interface{} }{
600 S: struct{ S string }{
608 in1: &struct{ S *struct{ S string } }{
609 S: &struct{ S string }{
613 in2: &struct{ S *struct{ S string } }{
616 out: &struct{ S *struct{ S string } }{
617 S: &struct{ S string }{
624 // Pointer not a struct
625 in1: &struct{ S *[]string }{
628 in2: &struct{ S *[]string }{
631 out: &struct{ S *[]string }{
637 // Error in nested struct
638 in1: &struct{ S interface{} }{
639 S: &struct{ I int }{
643 in2: &struct{ S interface{} }{
644 S: &struct{ I int }{
648 out: &struct{ S interface{} }{
649 S: &struct{ I int }{
660 in1: &struct{ S string }{
663 in2: &struct{ S string }{
666 out: &struct{ S string }{
677 in1: &struct{ S string }{
680 in2: &struct{ S string }{
683 out: &struct{ S string }{
694 in1: &struct{ S string }{
697 in2: &struct{ S string }{
700 out: &struct{ S string }{
713 in1: &struct {
718 in2: &struct {
723 out: &struct {
731 in1: &struct{ S string }{
734 in2: &struct{ S string }{
737 out: &struct{ S string }{
769 var appendMatchingPropertiesTestCases = []struct {
779 in1: []interface{}{&struct{ S string }{
782 in2: &struct{ S string }{
785 out: []interface{}{&struct{ S string }{
791 in1: []interface{}{&struct{ S string }{
794 in2: &struct{ S string }{
797 out: []interface{}{&struct{ S string }{
805 &struct{ S, A string }{
808 &struct{ S, B string }{
812 in2: &struct{ S string }{
816 &struct{ S, A string }{
819 &struct{ S, B string }{
827 &struct{ S, A string }{
830 &struct{ B string }{},
832 in2: &struct{ S string }{
836 &struct{ S, A string }{
839 &struct{ B string }{},
844 in1: []interface{}{&struct{ S, A string }{
847 in2: &struct{ S string }{
850 out: []interface{}{&struct
856 in1: []interface{}{&struct{ S *struct{ S, A string } }{
857 S: &struct{ S, A string }{
861 in2: &struct{ S *struct{ S string } }{
862 S: &struct{ S string }{
866 out: []interface{}{&struct{ S *struct{ S, A string } }{
867 S: &struct{ S, A string }{
877 in1: []interface{}{struct{}{}},
878 err: errors.New("expected pointer to struct, got struct {}"),
879 out: []interface{}{struct{}{}},
883 in1: []interface{}{&struct{}{}},
884 in2: struct{}{},
885 err: errors.New("expected pointer to struct, got struct {}"),
886 out: []interface{}{&struct{}{}},
889 // Non-struct in1
891 err: errors.New("expected pointer to struct, got *[]string"),
895 // Non-struct in2
896 in1: []interface{}{&struct{}{}},
898 err: errors.New("expected pointer to struct, got *[]string"),
899 out: []interface{}{&struct{}{}},
904 &struct{ A string }{},
905 &struct{ B string }{},
907 in2: &struct{ S string }{
911 &struct{ A string }{},
912 &struct{ B string }{},
919 &struct{ S string }{
923 in2: &struct{ S []string }{
927 &struct{ S string }{
936 &struct{ S []int }{
940 in2: &struct{ S []string }{
944 &struct{ S []int }{