Skip to content

Commit

Permalink
test: add test for round-trip of zero length byte slices
Browse files Browse the repository at this point in the history
  • Loading branch information
mappu committed Jan 24, 2025
1 parent e4756d1 commit a4b99fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/marshalling/marshalling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4b99fc

Please sign in to comment.