Property based testing is an approach for expanding the input coverage of code. There are a number of frameworks out there for other languages supporting this feature. I think in the long term this could be an interesting feature to have, expanding the toolset available for testing.
An example of how this might work with Cest could be:
describe("a suite with properties", []() {
property("concatenating two strings always contains the first string", [](string a, string b) {
return (a + b).find(a) != string::npos;
}
});
The framework would then generate a number of instances for the test, generating values randomly according to some rules. This kind of testing has some similarities with parameterized test cases, albeit the principles are quite different.
Property based testing is an approach for expanding the input coverage of code. There are a number of frameworks out there for other languages supporting this feature. I think in the long term this could be an interesting feature to have, expanding the toolset available for testing.
An example of how this might work with Cest could be:
The framework would then generate a number of instances for the test, generating values randomly according to some rules. This kind of testing has some similarities with parameterized test cases, albeit the principles are quite different.