Files
go-mxl-player/internal/playback/state_test.go
T
2026-08-27 09:38:35 +03:00

28 lines
567 B
Go

package playback
import (
"errors"
"testing"
"time"
)
func TestStatusPreservesValues(t *testing.T) {
wantErr := errors.New("producer missing")
status := Status{
Unit: UnitVideo,
State: StateReconnecting,
Attempt: 2,
FailedAttempts: 1,
RetryIn: time.Second,
Err: wantErr,
}
if status.Unit != UnitVideo {
t.Errorf("Unit = %v, want %v", status.Unit, UnitVideo)
}
// Check the remaining fields similarly.
if !errors.Is(status.Err, wantErr) {
t.Errorf("Err = %v, want %v", status.Err, wantErr)
}
}