github.com/haraldrudell/parl@v0.4.176/err-end-callbacks_test.go (about)

     1  /*
     2  © 2022–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/)
     3  ISC License
     4  */
     5  
     6  package parl
     7  
     8  import (
     9  	"errors"
    10  	"testing"
    11  )
    12  
    13  func TestEndCallbacks(t *testing.T) {
    14  	var err = ErrEndCallbacks
    15  	if !errors.Is(err, ErrEndCallbacks) {
    16  		t.Error("err not ErrEndCallbacks")
    17  	}
    18  	var err2 = errors.New("x")
    19  	if errors.Is(err2, ErrEndCallbacks) {
    20  		t.Error("err2 ErrEndCallbacks")
    21  	}
    22  }