github.com/hedzr/evendeep@v0.4.8/diff/update_test.go (about)

     1  package diff
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestUpdate_String(t *testing.T) {
     8  	var u = Update{
     9  		Old: nil,
    10  		New: nil,
    11  		Typ: "",
    12  	}
    13  	t.Logf("u: %v", u)
    14  
    15  	u = Update{
    16  		Old: 1,
    17  		New: nil,
    18  		Typ: "",
    19  	}
    20  	t.Logf("u: %v", u)
    21  
    22  	u = Update{
    23  		Old: 1,
    24  		New: 2,
    25  		Typ: "",
    26  	}
    27  	t.Logf("u: %v", u)
    28  
    29  	u = Update{
    30  		Old: 1,
    31  		New: int64(2),
    32  		Typ: "int64",
    33  	}
    34  	t.Logf("u: %v", u)
    35  
    36  	u = Update{
    37  		Old: 1,
    38  		New: 2,
    39  		Typ: "int",
    40  	}
    41  	// t.Logf("u: %v", u)
    42  }