Skip to content
Commit 47b78e6d authored by Christian Hergert's avatar Christian Hergert 💬
Browse files

tests: additional test for g_bytes_new_from_bytes()

This adds two new tests for g_bytes_new_from_bytes().

One test ensures that when creating a new GBytes that is a slice of
the entire base bytes, we just return the base bytes with it's reference
count incremented by one.

The other test ensures that when performing sub-slices of GBytes, for
which the parent GBytes also references a GBytes, that we skip the
intermediate GBytes and reference the base GBytes. Additional testing
of the internal state of the GBytes structure is performed to prove
the correctness of the implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=792780
parent 4151bce6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment