commit a6cacbbd58dbd334ead1c62e988a61e27206ea8f Author: Nickiel12 <35903114+Nickiel12@users.noreply.github.com> Date: Fri Dec 10 15:16:05 2021 -0800 basic setup 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