Skip to content

Commit

Permalink
reflect: add {methodIter.Seq,methodIter2.Seq2} test cases for {CanSeq…
Browse files Browse the repository at this point in the history
…,CanSeq2}

For #71874.

Change-Id: Idc834fdd9ade41ba4976ded32e5861a2dcef44bf
  • Loading branch information
callthingsoff committed Feb 22, 2025
1 parent f062d7b commit 90d63e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reflect/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func TestType_CanSeq(t *testing.T) {
{"map[int]int", reflect.TypeOf(make(map[int]int)), true},
{"string", reflect.TypeOf(""), true},
{"[]int", reflect.TypeOf([]int{}), true},
{"methodIter.Seq", reflect.ValueOf(methodIter{}).MethodByName("Seq").Type(), true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand All @@ -158,6 +159,7 @@ func TestType_CanSeq2(t *testing.T) {
{"map[int]int", reflect.TypeOf(make(map[int]int)), true},
{"string", reflect.TypeOf(""), true},
{"[]int", reflect.TypeOf([]int{}), true},
{"methodIter2.Seq2", reflect.ValueOf(methodIter2{}).MethodByName("Seq2").Type(), true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 90d63e8

Please sign in to comment.