去除setup_with_mit,使用clarm_mit代替

This commit is contained in:
HouXiaoxuan
2023-12-23 10:30:35 +08:00
parent 055dc49f52
commit c8b45c0b83
5 changed files with 19 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ fn test_hash() {
#[test]
fn test_write() -> Result<(), Error> {
util::setup_test_with_mit();
util::setup_test_with_clean_mit();
let path = "lines.txt";
//create会截断文件
let mut output = File::create(path)?; // ? 用于传播错误
@@ -24,7 +24,7 @@ fn test_write() -> Result<(), Error> {
#[test]
fn test_read() -> Result<(), Error> {
util::setup_test_with_mit();
util::setup_test_with_clean_mit();
let path = "lines.txt";
util::ensure_test_file(path.as_ref(), None);
let input = File::open(path)?;