tape: Dynamic tests put out more information

This commit is contained in:
Sasha Koshka 2025-08-12 08:16:21 -04:00
parent 8beb9de256
commit 1bded9852d

View File

@ -166,10 +166,10 @@ func testEncodeAny(test *testing.T, value any, correctTag Tag, correctBytes tu.S
test.Log("got: ", tu.HexBytes(bytes)) test.Log("got: ", tu.HexBytes(bytes))
test.Log("correct:", correctBytes) test.Log("correct:", correctBytes)
if tag != correctTag { if tag != correctTag {
return fmt.Errorf("tag not equal") return fmt.Errorf("tag not equal: %v != %v", tag, correctTag)
} }
if ok, n := correctBytes.Check(bytes); !ok { if ok, n := correctBytes.Check(bytes); !ok {
return fmt.Errorf("bytes not equal: %d", n) return fmt.Errorf("bytes not equal at index %d", n)
} }
if n != len(bytes) { if n != len(bytes) {
return fmt.Errorf("n not equal: %d != %d", n, len(bytes)) return fmt.Errorf("n not equal: %d != %d", n, len(bytes))