/explore
|
You are here |
www.drmaciver.com | ||
| | | | |
qsantos.fr
This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec, &Vec with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the stack &[T; N] (array reference)Example: &[i32; 100]N is tracked at ... Continue reading Rust Strings for C Programmers |
|
| | | | | ||
| | | | |
blog.nelhage.com
"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
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.iosiro.com
iosiro disclosed a high risk bug to Alchemix through Immunefi for a bounty of $7,500. This blog post details the bug and the disclosure process. |
|
| | | |||