整合測試

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);
}