mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-06-12 07:01:19 +00:00
Clean up the unit tests
This commit is contained in:
14
src/lib.rs
14
src/lib.rs
@ -48,9 +48,6 @@
|
||||
extern crate libc;
|
||||
extern crate sqlite3_sys as ffi;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate temporary;
|
||||
|
||||
macro_rules! raise(
|
||||
($message:expr) => (return Err(::Error::from($message)));
|
||||
);
|
||||
@ -117,14 +114,3 @@ pub type Result<T> = std::result::Result<T, Error>;
|
||||
pub fn open<'l, T: AsRef<std::path::Path>>(path: T) -> Result<Connection<'l>> {
|
||||
Connection::open(path)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::path::PathBuf;
|
||||
use temporary::Directory;
|
||||
|
||||
pub fn setup() -> (PathBuf, Directory) {
|
||||
let directory = Directory::new("sqlite").unwrap();
|
||||
(directory.path().join("database.sqlite3"), directory)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user