trpl-zh-cn/listings/ch11-writing-automated-tests/no-listing-13-fix-shared-test-code-problem/tests/integration_test.rs

12 lines
141 B
Rust
Raw Normal View History

2024-10-20 23:44:05 +08:00
use adder::add_two;
2022-02-06 16:43:51 +08:00
mod common;
#[test]
fn it_adds_two() {
common::setup();
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
}