Skip to content

Added Read/Write Unit Test for Boolean Values

Ray requested to merge Daniel-McCarthy:BooleanUnitTest into master

Created by: Daniel-McCarthy

A series of tests that check reading and writing booleans with no arguments, with different encodings, different endianness, and both. In addition to checks for reading the values all at once. This test passes.

Important Note: Although this unit test passes, I do have some concerns about this pull request. While adding this unit test I ran into some issues with reading the booleans as integers/bytes. This unit test first tests booleans written without additional arguments. Then it tests writing booleans with different encodings. Then with different encodings and endianness. And finally with different endianness.

When the order of the test for different endianness is swapped with the test that tests both different encodings and endianness at the same time, then the unit test will not pass.

These two tests pass individually, but if they are together, it will only work if the one that checks both endianness and encodings together is first.

This was very strange behavior. I am not yet sure if it is the result of a bug or an issue in my test logic. I decided to mention it here in case it is a sign of some unintended behavior.

Merge request reports