Skip to content

Commit 9440074

Browse files
committed
test: in TestOnionFailureSpecVector print out expected+returned bytes if failure
1 parent e113437 commit 9440074

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

obfuscation_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ func TestOnionFailureSpecVector(t *testing.T) {
266266
}
267267

268268
if !bytes.Equal(expectedSharedSecret, obfuscator.sharedSecret[:]) {
269-
t.Fatalf("shared secret not match with spec")
269+
t.Fatalf("shared secret not match with spec: expected "+
270+
"%x, got %x", expectedSharedSecret,
271+
obfuscator.sharedSecret[:])
270272
}
271273

272274
if i == 0 {
@@ -287,7 +289,9 @@ func TestOnionFailureSpecVector(t *testing.T) {
287289
"data: %v", err)
288290
}
289291
if !bytes.Equal(expectedObfuscatedData, obfuscatedData) {
290-
t.Fatalf("obfuscated data not match with spec")
292+
t.Fatalf("obfuscated data not match spec: expected %x, "+
293+
"got %x", expectedObfuscatedData[:],
294+
obfuscatedData[:])
291295
}
292296
}
293297

0 commit comments

Comments
 (0)