2023-03-02 14:48:02 -08:00
|
|
|
/* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
2025-05-04 17:48:53 +02:00
|
|
|
* Copyright (C) 2017-2025 WireGuard LLC. All Rights Reserved.
|
2023-03-02 14:48:02 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package conn
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestPrettyName(t *testing.T) {
|
|
|
|
|
var (
|
2023-03-13 17:55:05 +01:00
|
|
|
recvFunc ReceiveFunc = func(bufs [][]byte, sizes []int, eps []Endpoint) (n int, err error) { return }
|
2023-03-02 14:48:02 -08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const want = "TestPrettyName"
|
|
|
|
|
|
|
|
|
|
t.Run("ReceiveFunc.PrettyName", func(t *testing.T) {
|
|
|
|
|
if got := recvFunc.PrettyName(); got != want {
|
|
|
|
|
t.Errorf("PrettyName() = %v, want %v", got, want)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|