cargo test sub -- --nocapture
测试sub名称的测试函数,同时显示打印信息。
export RUSTFLAGS="-C target_feature=+avx2"
cargo test xxxx --no-default-features --features "std avx2_backend" -- --nocapture
本文介绍了一个具体的Cargo测试配置案例,包括如何指定测试函数名称、设置Rust编译标志以启用AVX2指令集,以及如何禁用默认特性并启用特定特性组合。这对于理解如何精细控制Rust项目的测试过程非常有用。
cargo test sub -- --nocapture
测试sub名称的测试函数,同时显示打印信息。
export RUSTFLAGS="-C target_feature=+avx2"
cargo test xxxx --no-default-features --features "std avx2_backend" -- --nocapture
1202
47

被折叠的 条评论
为什么被折叠?