Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup Dependencies #4

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
lazy_static = "1.4.0"
tempdir = "0.3.7"
tiledb-sys = {version = "0.1.0", path = "tiledb-sys" }

[dev-dependencies]
tempdir = "0.3.7"
22 changes: 11 additions & 11 deletions src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,17 @@ impl Drop for Array<'_> {

#[cfg(test)]
mod tests {
extern crate lazy_static;
extern crate tempdir;
use std::io;
use tempdir::TempDir;

use crate::array::*;
use crate::context::Context;
use crate::Datatype;
use lazy_static::lazy_static;

lazy_static! {
static ref DIR: tempdir::TempDir =
tempdir::TempDir::new("tiledb-rs.array").unwrap();
}

#[test]
fn test_array_create() {
let arr_path = DIR.path().join("test_array_create");
fn test_array_create() -> io::Result<()> {
let tmp_dir = TempDir::new("test_rs_bdelit")?;
let arr_dir = tmp_dir.path().join("create_test");

let c: Context = Context::new().unwrap();

Expand Down Expand Up @@ -196,6 +191,11 @@ mod tests {

// domain not set
// TODO
assert!(Array::create(&c, arr_path.to_str().unwrap(), s).is_ok());
assert!(Array::create(&c, arr_dir.to_str().unwrap(), s).is_ok());

// Make sure we can remove the array we created.
tmp_dir.close()?;

Ok(())
}
}