github.com/haraldrudell/parl@v0.4.176/g0/g0debug/go-error-dump_test.go (about)

     1  /*
     2  © 2023–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/)
     3  ISC License
     4  */
     5  
     6  package g0debug
     7  
     8  import (
     9  	"testing"
    10  
    11  	"github.com/haraldrudell/parl"
    12  )
    13  
    14  func TestGoErrorDump(t *testing.T) {
    15  	type args struct {
    16  		goError parl.GoError
    17  	}
    18  	tests := []struct {
    19  		name  string
    20  		args  args
    21  		wantS string
    22  	}{
    23  		{"nil", args{nil}, "parl.GoError: type: <nil>"},
    24  	}
    25  	for _, tt := range tests {
    26  		t.Run(tt.name, func(t *testing.T) {
    27  			if gotS := GoErrorDump(tt.args.goError); gotS != tt.wantS {
    28  				t.Errorf("GoErrorDump() = %v, want %v", gotS, tt.wantS)
    29  			}
    30  		})
    31  	}
    32  	//t.Fail()
    33  }