项目
在 GitHub 查看
CodeSandwich/Mocktopus
关于
Rust 模拟框架
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
Mocking framework for Rust (currently only nightly). See documentation for more.
#[mockable]
mod hello_world {
pub fn world() -> &'static str {
"world"
}
pub fn hello_world() -> String {
format!("Hello {}!", world())
}
}
#[test]
fn mock_test() {
hello_world::world.mock_safe(|| MockResult::Return("mocking"));
assert_eq!("Hello mocking!", hello_world::hello_world());
}
探索相关项目
加载中…