3 ms·
I don't know why you say that C is bad for exercising error conditions or fuzzing. In my experience, it's the best at those.
by gavinhoward 4y ago
I don't know why you say that C is bad for exercising error conditions or fuzzing. In my experience, it's the best at those.
- tialaramex 4y agoIt doesn't come with either capability, so you're adding third party tooling to get these working.
- gavinhoward 4y agoWell, sure, but that's true of any language.
- tialaramex 4y agoNope, when I write tests in my Rust the out of box cargo test will check those tests pass. If I wrote inline Markdown documentation for part of the Rust code with an example, cargo test will try to build my example, and check it works - not much good having a purported "example" which doesn't even work, is it? And yet many languages don't do this.
- gavinhoward 4y agoYou said fuzzing and exercising error conditions. Rust's tooling does not do that. You need something to generate those tests. Fuzzing is still not part of the default Rust tooling.
- GoblinSlayer 4y agoMere existence of a test runner is infinitesimal compared to your proposed careful testing. Saying this as someone who wrote my own test runner, it's a few lines of code.