From 0c36b899da59eb283b2b7c69e1accdd915e80266 Mon Sep 17 00:00:00 2001 From: David Senk Date: Sat, 7 Sep 2024 15:27:38 -0400 Subject: [PATCH] boilerplate setup --- src/lib.rs | 4 ++++ src/main.rs | 3 --- tests/state_changer.rs | 12 ++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 src/lib.rs delete mode 100644 src/main.rs create mode 100644 tests/state_changer.rs diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..ccf2873 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,4 @@ + +pub struct StateOwner { + pub state: String, +} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index e7a11a9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - println!("Hello, world!"); -} diff --git a/tests/state_changer.rs b/tests/state_changer.rs new file mode 100644 index 0000000..924f221 --- /dev/null +++ b/tests/state_changer.rs @@ -0,0 +1,12 @@ +use state_queue::StateOwner; + +#[test] +fn create_state_owner() { + //this test is just to show how to initialize state + //and verify that cargo test is actually working + let example = StateOwner{ + state: String::from("State Owner Created!"), + }; + + assert_eq!(example.state, "State Owner Created!"); +} \ No newline at end of file