集成测试

lib.rs

pub fn to_test(output: bool) -> bool {
    output
}

tests/文件夹中的每个文件都编译为单个包。tests/integration_test.rs

extern crate test_lib;
use test_lib::to_test;

#[test]
fn test_to_test(){
    assert_eq!(to_test(true), true);
}