@@ -121,7 +121,7 @@ func TestCipherDataRace(t *testing.T) {
121
121
b := make ([]byte , 32 )
122
122
_ , err := rand .Read (b )
123
123
if err != nil {
124
- t .Fatalf ("unexecpted error reading random bytes: %v" , err )
124
+ t .Errorf ("unexecpted error reading random bytes: %v" , err )
125
125
}
126
126
127
127
sha := fmt .Sprintf ("%x" , sha1 .New ().Sum (b ))
@@ -131,34 +131,34 @@ func TestCipherDataRace(t *testing.T) {
131
131
132
132
value1 , err := c .Marshal (tc )
133
133
if err != nil {
134
- t .Fatalf ("unexpected err: %v" , err )
134
+ t .Errorf ("unexpected err: %v" , err )
135
135
}
136
136
137
137
value2 , err := c .Marshal (tc )
138
138
if err != nil {
139
- t .Fatalf ("unexpected err: %v" , err )
139
+ t .Errorf ("unexpected err: %v" , err )
140
140
}
141
141
142
142
if value1 == value2 {
143
- t .Fatalf ("expected marshaled values to not be equal %v != %v" , value1 , value2 )
143
+ t .Errorf ("expected marshaled values to not be equal %v != %v" , value1 , value2 )
144
144
}
145
145
146
146
got1 := & TC {}
147
147
err = c .Unmarshal (value1 , got1 )
148
148
if err != nil {
149
- t .Fatalf ("unexpected err unmarshalling struct: %v" , err )
149
+ t .Errorf ("unexpected err unmarshalling struct: %v" , err )
150
150
}
151
151
152
152
if ! reflect .DeepEqual (got1 , tc ) {
153
153
t .Logf ("want: %#v" , tc )
154
154
t .Logf (" got: %#v" , got1 )
155
- t .Fatalf ("expected structs to be equal" )
155
+ t .Errorf ("expected structs to be equal" )
156
156
}
157
157
158
158
got2 := & TC {}
159
159
err = c .Unmarshal (value2 , got2 )
160
160
if err != nil {
161
- t .Fatalf ("unexpected err unmarshalling struct: %v" , err )
161
+ t .Errorf ("unexpected err unmarshalling struct: %v" , err )
162
162
}
163
163
164
164
if ! reflect .DeepEqual (got1 , got2 ) {
0 commit comments