mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
20 lines
382 B
Go
20 lines
382 B
Go
package winpowrprof
|
|
|
|
import (
|
|
"runtime"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestPowerEvents(t *testing.T) {
|
|
if runtime.GOOS != "windows" {
|
|
t.SkipNow()
|
|
}
|
|
t.Parallel()
|
|
listener, err := NewEventListener(func(event int) {})
|
|
require.NoError(t, err)
|
|
require.NotNil(t, listener)
|
|
require.NoError(t, listener.Start())
|
|
require.NoError(t, listener.Close())
|
|
}
|