News for hackers. Stuff that matters.
Re:I love coding in C by jupp0r on Thursday December 26, 2019 @10:37AM (#21884483)
It sounds like your use case is property based testing. Have you tried any of the QuickCheck ports to C++? My favorite is RapidCheck (https://github.com/emil-e/rapidcheck). You define generators for your struct fields and write a pure function to check whether the parsed output conforms to your expectations.
Re:I love coding in C by linuxlizard on Thursday December 26, 2019 @12:45PM (#21885409)
Checking that out now! Reminds me a little of the Python library Hypothesis. https://hypothesis.readthedocs.io/en/latest/