Skip to content

Commit

Permalink
Add unit tests for Blank metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Luni-4 committed Apr 10, 2020
1 parent 63e9455 commit 3bade9e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/loc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,39 @@ mod tests {

use super::*;

#[test]
fn test_blank_python() {
check_metrics!(
"\na = 42\n\n",
"foo.py",
PythonParser,
loc,
[(blank, 1, usize)]
);
}

#[test]
fn test_blank_rust() {
check_metrics!(
"\nlet a = 42;\n\n",
"foo.rs",
RustParser,
loc,
[(blank, 1, usize)]
);
}

#[test]
fn test_blank_c() {
check_metrics!(
"\nint a = 42;\n\n",
"foo.c",
CppParser,
loc,
[(blank, 1, usize)]
);
}

#[test]
fn test_cloc_python() {
check_metrics!(
Expand Down

0 comments on commit 3bade9e

Please sign in to comment.