src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/testutil/recover_test.go (about)

     1  package testutil
     2  
     3  import (
     4  	"testing"
     5  
     6  	"src.elv.sh/pkg/tt"
     7  )
     8  
     9  var Args = tt.Args
    10  
    11  func TestRecover(t *testing.T) {
    12  	tt.Test(t, Recover,
    13  		Args(func() {}).Rets(nil),
    14  		Args(func() {
    15  			panic("unreachable")
    16  		}).Rets("unreachable"),
    17  	)
    18  }