mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			322 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			322 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package errors
 | 
						|
 | 
						|
import (
 | 
						|
	"errors"
 | 
						|
	"testing"
 | 
						|
)
 | 
						|
 | 
						|
func TestNew(t *testing.T) {
 | 
						|
	t.Log(New("hello"))
 | 
						|
	t.Log(Wrap(errors.New("hello")))
 | 
						|
	t.Log(testError1())
 | 
						|
	t.Log(Wrap(testError1()))
 | 
						|
	t.Log(Wrap(testError2()))
 | 
						|
}
 | 
						|
 | 
						|
func testError1() error {
 | 
						|
	return New("test error1")
 | 
						|
}
 | 
						|
 | 
						|
func testError2() error {
 | 
						|
	return Wrap(testError1())
 | 
						|
}
 |