1分钟内可阅读完
译文 · 基于 Rust By Example
原文链接: https://doc.rust-lang.org/stable/rust-by-example/testing.html
Rust 是一门非常重视正确性的语言,这门语言本身就提供了对编写软件测试的支持。
测试有三种风格:
Rust 也支持在测试中指定额外的依赖:
单元测试 — Rust By Example
文档测试 — Rust By Example
集成测试 — Rust By Example
开发依赖 — Rust By Example