1
0
Fork 0
golang-forgejo-f3-gof3/util/convert_test.go
Daniel Baumann 03bfe4079e
Adding upstream version 3.10.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-18 09:37:23 +02:00

26 lines
456 B
Go

// Copyright Earl Warren <contact@earl-warren.org>
// Copyright Loïc Dachary <loic@dachary.org>
// SPDX-License-Identifier: MIT
package util
import (
"testing"
"github.com/stretchr/testify/assert"
)
type A struct{}
func (A) FA() {}
type AI interface {
FA()
}
func TestConvertInterface(t *testing.T) {
length := 10
input := make([]A, length)
output := ConvertMap(input, func(a A) AI { return a })
assert.EqualValues(t, length, len(output))
}