Compare 5a2ae4a ... +0 ... 7c021de

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -472,6 +472,13 @@
Loading
472 472
    out.join("\n")
473 473
}
474 474
475 +
pub fn empty_face(width: u32, height: u32) -> String {
476 +
    (0..height)
477 +
        .map(|_| " ".repeat(width as usize))
478 +
        .collect::<Vec<String>>()
479 +
        .join("\n")
480 +
}
481 +
475 482
#[cfg(test)]
476 483
mod tests {
477 484
    use super::*;
@@ -690,4 +697,13 @@
Loading
690 697
        let r = "o#\n#o";
691 698
        assert_eq!(overlay(a, b, -1, -1), r);
692 699
    }
700 +
701 +
    #[test]
702 +
    fn test_empty_face() {
703 +
        assert_eq!(empty_face(0, 0), "");
704 +
        assert_eq!(empty_face(1, 1), " ");
705 +
        assert_eq!(empty_face(2, 2), "  \n  ");
706 +
        assert_eq!(empty_face(2, 3), "  \n  \n  ");
707 +
        assert_eq!(empty_face(4, 2), "    \n    ");
708 +
    }
693 709
}

@@ -182,10 +182,7 @@
Loading
182 182
        let face_lines = if let Some(line_style) = &self.line_style {
183 183
            unimplemented!("Text rendering does not yet support line plots")
184 184
        } else {
185 -
            (0..face_height)
186 -
                .map(|_| " ".repeat(face_width as usize))
187 -
                .collect::<Vec<String>>()
188 -
                .join("\n")
185 +
            text_render::empty_face(face_width, face_height)
189 186
        };
190 187
        let face_points = if let Some(point_style) = &self.point_style {
191 188
            text_render::render_face_points(
@@ -197,10 +194,7 @@
Loading
197 194
                &point_style,
198 195
            )
199 196
        } else {
200 -
            (0..face_height)
201 -
                .map(|_| " ".repeat(face_width as usize))
202 -
                .collect::<Vec<String>>()
203 -
                .join("\n")
197 +
            text_render::empty_face(face_width, face_height)
204 198
        };
205 199
        text_render::overlay(&face_lines, &face_points, 0, 0)
206 200
    }

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src 0.50% 62.44%
tests/test_no_data.rs 100.00%
Project Totals (14 files) 63.17%
Loading