mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-29 03:08:47 -06:00
22 lines
358 B
Go
22 lines
358 B
Go
package d
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/attic-labs/noms/Godeps/_workspace/src/github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestTry(t *testing.T) {
|
|
assert := assert.New(t)
|
|
|
|
IsUsageError(assert, func() { Exp.Fail("hey-o") })
|
|
|
|
assert.Panics(func() {
|
|
Try(func() { Chk.Fail("hey-o") })
|
|
})
|
|
|
|
assert.Panics(func() {
|
|
Try(func() { panic("hey-o") })
|
|
})
|
|
}
|