diff --git a/.gitignore b/.gitignore index ffea379..a0fb642 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -/target +**/target .DS_Store Cargo.lock \ No newline at end of file diff --git a/tests/Cargo.toml b/tests/Cargo.toml new file mode 100644 index 0000000..55169e6 --- /dev/null +++ b/tests/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "tests" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +hardened_malloc-sys = { path = "..", features = ["gcc"]} \ No newline at end of file diff --git a/tests/src/main.rs b/tests/src/main.rs new file mode 100644 index 0000000..1b22e5e --- /dev/null +++ b/tests/src/main.rs @@ -0,0 +1,11 @@ +use hardened_malloc_sys::HardenedMalloc; + +#[global_allocator] +static GLOBAL: HardenedMalloc = HardenedMalloc; + +fn main() { + let mut v = Vec::new(); + v.push(1); + v.resize(5, 0); + println!("v has value: {:?}", v); +}