News for hackers. Stuff that matters.
Re:Rust testing or verifying: Why not both? by siscia on Friday September 04, 2020 @07:52AM (#24374102)
I implemented a tiny and simple data structure in rust, a circular buffer: https://github.com/RedBeardLab/circular-buffer-rs

The amount of subtle bugs and problems that proptest was able to point out to me was terrific.

Property based testing it is definitely the tool that you want to use to thoroughly test a complex library that need to maintains its invariants.

The interesting bit is that if you approach the problem with unittest, you will write mostly test that pass. If you approach the test writing as a property test, then you will write much harder test cases.

Re:Rust testing or verifying: Why not both? by eru on Friday September 04, 2020 @08:25AM (#24374299)
Apropos hard test cases: have a look at the floats that Python's Hypothesis property testing library generates. They are truly evil.