First, any code blocks in documentation comments will be tested by default if they don't have ignore or any non-recognized tag. So, for example:
/// ```ignore /// let x = 12; /// x += 1; /// ```
This block code won't be tested (luckily, because it wouldn't compile!). A few other examples:
/// # Some text /// /// ```text /// this is just some text /// but it's rendered inside a code block /// nice, right? /// ``` /// /// # Why not C? /// /// ```c-language /// int strlen(const char *s) { /// char *c = s; /// /// for (; *c; ++c); /// return c - s; /// } /// ``` /// /// # Or an unknown language? /// /// ```whatever /// 010010000110100100100001 /// ```
A few other instructions might come in handy for you. Let's start with ignore!