github.com/fawick/restic@v0.1.1-0.20171126184616-c02923fbfc79/internal/restic/id_int_test.go (about)

     1  package restic
     2  
     3  import "testing"
     4  
     5  func TestIDMethods(t *testing.T) {
     6  	var id ID
     7  
     8  	if id.Str() != "[null]" {
     9  		t.Errorf("ID.Str() returned wrong value, want %v, got %v", "[null]", id.Str())
    10  	}
    11  
    12  	var pid *ID
    13  	if pid.Str() != "[nil]" {
    14  		t.Errorf("ID.Str() returned wrong value, want %v, got %v", "[nil]", pid.Str())
    15  	}
    16  }