2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-08-29 16:46:26 +00:00
|
|
|
|
|
|
|
package wgint
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-12-09 23:12:20 +00:00
|
|
|
"github.com/tailscale/wireguard-go/device"
|
2022-08-29 16:46:26 +00:00
|
|
|
)
|
|
|
|
|
2024-02-25 14:40:35 +00:00
|
|
|
func TestInternalOffsets(t *testing.T) {
|
2022-08-29 16:46:26 +00:00
|
|
|
peer := new(device.Peer)
|
|
|
|
if got := PeerLastHandshakeNano(peer); got != 0 {
|
|
|
|
t.Errorf("PeerLastHandshakeNano = %v, want 0", got)
|
|
|
|
}
|
|
|
|
if got := PeerRxBytes(peer); got != 0 {
|
|
|
|
t.Errorf("PeerRxBytes = %v, want 0", got)
|
|
|
|
}
|
|
|
|
if got := PeerTxBytes(peer); got != 0 {
|
|
|
|
t.Errorf("PeerTxBytes = %v, want 0", got)
|
|
|
|
}
|
2024-02-25 14:40:35 +00:00
|
|
|
if got := PeerHandshakeAttempts(peer); got != 0 {
|
|
|
|
t.Errorf("PeerHandshakeAttempts = %v, want 0", got)
|
|
|
|
}
|
2022-08-29 16:46:26 +00:00
|
|
|
}
|