move MemoryDB's tests into tests module

This commit is contained in:
Guanqun Lu 2017-05-27 11:33:18 +08:00
parent 4efd673c19
commit ce8f8f40d7

View File

@ -250,6 +250,10 @@ impl HashDB for MemoryDB {
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn memorydb_remove_and_purge() {
let hello_bytes = b"Hello world!";
@ -293,3 +297,4 @@ fn consolidate() {
assert_eq!(overlay.get(&remove_key).unwrap(), &(DBValue::from_slice(b"doggo"), 0));
assert_eq!(overlay.get(&insert_key).unwrap(), &(DBValue::from_slice(b"arf"), 2));
}
}