test: add test for round-trip of zero length byte slices

This commit is contained in:
mappu 2025-01-24 18:51:21 +13:00
parent e4756d1e76
commit a4b99fcfae

View File

@ -106,6 +106,17 @@ func testMarshalling(t *testing.T) {
}
})
t.Run("QByteArray of zero length", func(t *testing.T) {
input := ""
ba := qt.QFile_EncodeName(input)
got := qt.QFile_DecodeName(ba)
if input != got {
t.Fatalf("QByteArray: expected %q, got %q", input, got)
}
})
// QMap
t.Run("QMap", func(t *testing.T) {
input := make(map[string]qt.QVariant)