mirror of
https://github.com/asticode/go-astiav.git
synced 2025-09-26 20:21:15 +08:00
18 lines
299 B
Go
18 lines
299 B
Go
package astiav
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestIOInterrupter(t *testing.T) {
|
|
ii := NewIOInterrupter()
|
|
defer ii.Free()
|
|
require.False(t, ii.Interrupted())
|
|
ii.Interrupt()
|
|
require.True(t, ii.Interrupted())
|
|
ii.Resume()
|
|
require.False(t, ii.Interrupted())
|
|
}
|