Explore >> Select a destination


You are here

www.drmaciver.com
| | blog.nelhage.com
8.1 parsecs away

Travel
| | "Property-based testing" refers to the idea of writing statements that should be true of your code ("properties"), and then using automated tooling to generate test inputs (typically, randomly-generated inputs of an appropriate type), and observe whether the properties hold for that input. If an input violates a property, you've demonstrated a bug, as well as a convenient example that demonstrates it. A classic example of property-based testing is testing a sort function:
| | hypothesis.works
8.3 parsecs away

Travel
| | The Encode/Decode invariant One of the simplest types of invariant to find once you move past just fuzzing your code is asserting that two different operations should produce the same result, and one of the simplest instances of that is looking for encode/decode pairs. That is, you have some function that takes a value and encodes it as another value, and another that is supposed to reverse the process. This is ripe for testing with Hypothesis because it has a natural completely defined specification: Encoding and then decoding should be exactly the same as doing nothing. Lets look at a concrete example. Test faster, fix more
| | www.vincehuston.org
18.4 parsecs away

Travel
| | Dozens of 1-page examples in C++ and Java. Before-and-After refactoring examples. Book summaries.
| | nikgrozev.com
40.1 parsecs away

Travel
| Oracle has recently released a 3-week JDK 8 Massive Open and Online Course called "Lambdas and Streams", which discusses the new JDK8 functional features in ...