Skip to content

Instantly share code, notes, and snippets.

@yammmt
Created January 4, 2021 09:46
Show Gist options
  • Save yammmt/ccb2950b5503da45e835a2d796e695a8 to your computer and use it in GitHub Desktop.
Save yammmt/ccb2950b5503da45e835a2d796e695a8 to your computer and use it in GitHub Desktop.
(Rust) test from another file
#[cfg(test)]
mod tests;
fn main() {
println!("Hello, world!");
}
fn one_p_one() -> u16 {
2
}
use super::*;
#[test]
fn test_opo() {
assert_eq!(one_p_one(), 2);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment