How to implement unit test for a simple C function that returns binary data?

I want to implement some very simple C / C ++ unit tests for a function that needs to compress or decompress some data.

Basically, the input is a binary block, and the output is also a binary block. Binary blocks should be less than 50 bytes, possibly having 5-6 pairs.

I am looking for a solution that most likely will not require third-party libraries. If this requires it, you need to be very small / simple.

+5
source share
3 answers

"I'm looking for a solution that does not require third-party libraries."

unit-test, : , be-be-testet . --, , .

+1

- , , , :

  • (, , )
  • , ,
+1

, . 1. . , . . 2. . - . - (, ). , - , , . , , . unit test . , , .

0
source

All Articles