From a6cacbbd58dbd334ead1c62e988a61e27206ea8f Mon Sep 17 00:00:00 2001 From: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Fri, 10 Dec 2021 15:16:05 -0800 Subject: [PATCH] basic setup --- .gitignore | 1 + Cargo.lock | 7 ++++++ Cargo.toml | 8 +++++++ src/main.rs | 7 ++++++ src/modules/mod.rs | 5 ++++ src/modules/stream_states/enums.rs | 13 ++++++++++ .../stream_states/stream_states_class.rs | 2 ++ src/tests/mod.rs | 6 +++++ src/tests/stream_states_tests.rs | 24 +++++++++++++++++++ src/tests/tests.rs | 8 +++++++ 10 files changed, 81 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/main.rs create mode 100644 src/modules/mod.rs create mode 100644 src/modules/stream_states/enums.rs create mode 100644 src/modules/stream_states/stream_states_class.rs create mode 100644 src/tests/mod.rs create mode 100644 src/tests/stream_states_tests.rs create mode 100644 src/tests/tests.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..8672c49 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "church_controller" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..ab47e0d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "church_controller" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..5af09ac --- /dev/null +++ b/src/main.rs @@ -0,0 +1,7 @@ + +mod tests; +mod modules; + +fn main() { + println!("Hello, world!"); +} diff --git a/src/modules/mod.rs b/src/modules/mod.rs new file mode 100644 index 0000000..19ceae4 --- /dev/null +++ b/src/modules/mod.rs @@ -0,0 +1,5 @@ + +pub mod stream_states { + pub mod stream_states_class; + pub mod enums; +} \ No newline at end of file diff --git a/src/modules/stream_states/enums.rs b/src/modules/stream_states/enums.rs new file mode 100644 index 0000000..cc03ac1 --- /dev/null +++ b/src/modules/stream_states/enums.rs @@ -0,0 +1,13 @@ + +pub enum CameraScenes { + CameraDefault, + CameraWithUpperRight, + CameraWithLargeUpperRight, + CameraWithLowerRight, +} + +pub enum ScreenScenes { + ScreenDefault, + ScreenWithUpperRight, + ScreenWithLowerRight, +} \ No newline at end of file diff --git a/src/modules/stream_states/stream_states_class.rs b/src/modules/stream_states/stream_states_class.rs new file mode 100644 index 0000000..139597f --- /dev/null +++ b/src/modules/stream_states/stream_states_class.rs @@ -0,0 +1,2 @@ + + diff --git a/src/tests/mod.rs b/src/tests/mod.rs new file mode 100644 index 0000000..3a21d0b --- /dev/null +++ b/src/tests/mod.rs @@ -0,0 +1,6 @@ + +#[cfg(test)] +pub mod tests; + +#[cfg(test)] +pub mod stream_states_tests; \ No newline at end of file diff --git a/src/tests/stream_states_tests.rs b/src/tests/stream_states_tests.rs new file mode 100644 index 0000000..f36c3cb --- /dev/null +++ b/src/tests/stream_states_tests.rs @@ -0,0 +1,24 @@ + +use crate::modules::stream_states as s_s; + +#[test] +fn has_all_enums() { + { + let members = [ + s_s::enums::CameraScenes::CameraDefault, + s_s::enums::CameraScenes::CameraWithUpperRight, + s_s::enums::CameraScenes::CameraWithLowerRight, + s_s::enums::CameraScenes::CameraWithLargeUpperRight, + ]; + assert_eq!(members.len(), 4); + } + { + let members = [ + s_s::enums::ScreenScenes::ScreenDefault, + s_s::enums::ScreenScenes::ScreenWithUpperRight, + s_s::enums::ScreenScenes::ScreenWithLowerRight, + ]; + assert_eq!(members.len(), 3); + } + +} \ No newline at end of file diff --git a/src/tests/tests.rs b/src/tests/tests.rs new file mode 100644 index 0000000..676c985 --- /dev/null +++ b/src/tests/tests.rs @@ -0,0 +1,8 @@ + +#[test] +fn it_works() { + let result = 2 + 2; + assert_eq!(result, 4); +} + +//Stream States Tests