Files
dolt/d/try_test.go
2015-08-26 14:05:40 -07:00

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") })
})
}