trpl-zh-cn/listings/ch11-writing-automated-tests/listing-11-13/tests/integration_test.rs

8 lines
106 B
Rust
Raw Permalink Normal View History

use adder::add_two;
2022-02-06 16:43:51 +08:00
#[test]
fn it_adds_two() {
2024-10-20 23:44:05 +08:00
let result = add_two(2);
assert_eq!(result, 4);
2022-02-06 16:43:51 +08:00
}