@@ -67,16 +67,6 @@ var testCases = []string{
6767 "zzzzzzzzzzzzzzzzzzzzzz" ,
6868}
6969
70- func BenchmarkUnmarshalBytesOld (b * testing.B ) {
71- dst := make ([]byte , 16 )
72- src := []byte (testCases [0 ])
73-
74- b .ResetTimer ()
75- for i := 0 ; i < b .N ; i ++ {
76- _ = UnmarshalBytesOld (dst , src )
77- }
78- }
79-
8070func BenchmarkUnmarshalBytesNew (b * testing.B ) {
8171 dst := make ([]byte , 16 )
8272 src := []byte (testCases [0 ])
@@ -97,24 +87,3 @@ func BenchmarkUnmarshalBytesNewMultiple(b *testing.B) {
9787 }
9888 }
9989}
100-
101- func TestUnmarshalBytesConsistency (t * testing.T ) {
102- for _ , tc := range testCases {
103- src := []byte (tc )
104- dst1 := make ([]byte , 16 )
105- dst2 := make ([]byte , 16 )
106-
107- err1 := UnmarshalBytesOld (dst1 , src )
108- err2 := UnmarshalBytes (dst2 , src )
109-
110- if err1 != err2 {
111- t .Fatalf ("Error mismatch for %q: old=%v, new=%v" , tc , err1 , err2 )
112- }
113-
114- for i := range dst1 {
115- if dst1 [i ] != dst2 [i ] {
116- t .Fatalf ("Result mismatch for %q at byte %d: old=%x, new=%x" , tc , i , dst1 , dst2 )
117- }
118- }
119- }
120- }
0 commit comments