chore: add basic testing module

This commit is contained in:
Evan Huff 2024-04-08 14:52:30 -04:00 committed by June
parent 7dec771487
commit 3243c882df
3 changed files with 21 additions and 1 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
/target
**/target
.DS_Store
Cargo.lock

9
tests/Cargo.toml Normal file
View file

@ -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"]}

11
tests/src/main.rs Normal file
View file

@ -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);
}