Skip to content

Commit cf6469f

Browse files
committed
reflect: add some more complex conversion tests
1 parent 7923d27 commit cf6469f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/reflect/convert_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@ func TestTinyConvert(t *testing.T) {
181181
{V(float32(167)), V(float64(167))},
182182
{V(float64(168)), V(float32(168))},
183183
{V(float64(169)), V(float64(169))},
184+
185+
{V(float64(1.5)), V(int(1))},
186+
187+
// complex
188+
{V(complex64(1i)), V(complex64(1i))},
189+
{V(complex64(2i)), V(complex128(2i))},
190+
{V(complex128(3i)), V(complex64(3i))},
191+
{V(complex128(4i)), V(complex128(4i))},
184192
}
185193

186194
for _, tt := range tests {

0 commit comments

Comments
 (0)