got datatype read/write working with database.

This commit is contained in:
2023-03-19 13:02:20 -04:00
parent 418ba26da9
commit abfa7114df
3 changed files with 113 additions and 57 deletions

View File

@ -191,7 +191,7 @@ mod file_data {
Err(err) => match err.code {
ErrorCode::CorruptFile => Ok(()),
_ => Err(DBError::new("incorrect error code")),
}
},
}
}
@ -214,15 +214,15 @@ mod file_data {
assert!(
err.source().is_some(),
"Should state file corruption cause."
);
);
assert_eq!(
err.source().unwrap().to_string(),
format!("database {} already exists", name)
);
);
Ok(())
},
}
_ => Err(DBError::new("incorrect error code")),
}
},
}
}
}