-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run coverage on whole workspace #71
Conversation
dee12e0
to
344f34c
Compare
Codecov Report
@@ Coverage Diff @@
## main #71 +/- ##
==========================================
- Coverage 97.30% 94.90% -2.40%
==========================================
Files 13 20 +7
Lines 1632 2691 +1059
==========================================
+ Hits 1588 2554 +966
- Misses 44 137 +93
|
612c933
to
e4a2ccb
Compare
@@ -77,3 +77,60 @@ pub extern "C" fn set_logging_callback( | |||
} | |||
} | |||
} | |||
|
|||
#[cfg(test)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i recently learned that there is an easy way to split out tests into separate file, e.g more like in golang. do you like that or not so much?
#[cfg(test)]
#[path = "log_test.rs"]
pub mod test;
and then in log_test.rs
#[test]
fn test_c_logger() {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is possible, but by convention in Rust, the unit tests go in the same file as the implementation (https://doc.rust-lang.org/book/ch11-03-test-organization.html). I think it makes sense to keep them close, especially if the tests are simple, there aren't many of them. If there are many/they are complex, it's an indication that maybe they should be integration tests (these land in separate tests directory.
No description provided.