#testing
5 posts tagged #testing.
228 Qt model edge cases, and the ones my models failed
I wrote down 228 edge cases for the observable Qt models and tested each one. 170 work, 22 are refused on purpose, 27 were defects that are now fixed, and 9 are still pinned. The defects included an editor that writes an empty value back, and a model that survives its container with stale rows.
Auto-generated mocks from interfaces
Corrected on 5 October 2026: reflection cannot generate the mock class this post describes, because define_aggregate adds data members and no functions. The correction at the top has the GCC errors; the rest is kept as published.
The same assertion, as a unit test and as a fuzzer
Google FuzzTest lets one assertion serve as both a bounded property test that runs with your normal suite and a coverage-guided fuzzer you invoke on demand. Written against a deliberately buggy encoder, it found the counterexample without being asked to fuzz at all, and printed a regression test to paste back.
A real GoogleTest suite runs in your browser
GoogleTest is a Compiler Explorer library, so a real test binary builds and runs in the browser and prints the familiar RUN/OK report. That makes a shareable link the cheapest possible way to settle an argument about behavior. Episode 1 of the verification series, on assembling a C++ setup that catches bugs before your users do.
reflect_arbitrary: property-based test generators, inferred from your types
Corrected on 6 October 2026: reflect_arbitrary is not a published library (its repository holds only a README), the embedded demo is a reduced stand-in with a fixed-range random generator, and the printed shrinking output came from no test and is removed. The correction at the top has the details; the rest is kept as published.