mirror of
https://github.com/kopia/kopia.git
synced 2026-01-22 21:38:06 -05:00
20 lines
359 B
Go
20 lines
359 B
Go
package impossible_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/pkg/errors"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/kopia/kopia/internal/impossible"
|
|
)
|
|
|
|
func TestImpossible(t *testing.T) {
|
|
impossible.PanicOnError(nil)
|
|
|
|
someErr := errors.New("some error")
|
|
require.PanicsWithError(t, someErr.Error(), func() {
|
|
impossible.PanicOnError(someErr)
|
|
})
|
|
}
|