Append a single failure record. `name_pretty` is the dot-separated form of the constant; `msg` is the raw error string (newlines collapsed to ` | ` to keep each comment on one line).
(&self, name_pretty: &str, msg: &str)
| 150 | /// of the constant; `msg` is the raw error string (newlines collapsed to |
| 151 | /// ` | ` to keep each comment on one line). |
| 152 | fn record(&self, name_pretty: &str, msg: &str) { |
| 153 | let one_line = msg.replace('\n', " | "); |
| 154 | let mut file = self.writer.lock().unwrap(); |
| 155 | let _ = writeln!(file, "# {one_line}"); |
| 156 | let _ = writeln!(file, "{name_pretty}"); |
| 157 | let _ = writeln!(file); |
| 158 | let _ = file.flush(); |
| 159 | self.count.fetch_add(1, Ordering::Relaxed); |
| 160 | } |
| 161 | |
| 162 | /// Append the trailing `# total failures: N` summary. Called once after |
| 163 | /// all per-constant checks have reported. |
no test coverage detected