Skip to content

Commit 937b6db

Browse files
committed
Move the nom c test up
1 parent 05d71ca commit 937b6db

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/metrics/nom.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,25 @@ mod tests {
240240
);
241241
}
242242

243+
#[test]
244+
fn c_nom() {
245+
check_metrics!(
246+
"int foo();
247+
248+
int foo() {
249+
return 0;
250+
}",
251+
"foo.c",
252+
CppParser,
253+
nom,
254+
[
255+
(functions, 1, usize),
256+
(closures, 0, usize),
257+
(total, 1, usize)
258+
]
259+
);
260+
}
261+
243262
#[test]
244263
fn cpp_nom() {
245264
check_metrics!(

0 commit comments

Comments
 (0)