basic setup

This commit is contained in:
Nickiel12 2021-12-10 15:16:05 -08:00
commit a6cacbbd58
10 changed files with 81 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/target

7
Cargo.lock generated Normal file
View file

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

8
Cargo.toml Normal file
View file

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

7
src/main.rs Normal file
View file

@ -0,0 +1,7 @@
mod tests;
mod modules;
fn main() {
println!("Hello, world!");
}

5
src/modules/mod.rs Normal file
View file

@ -0,0 +1,5 @@
pub mod stream_states {
pub mod stream_states_class;
pub mod enums;
}

View file

@ -0,0 +1,13 @@
pub enum CameraScenes {
CameraDefault,
CameraWithUpperRight,
CameraWithLargeUpperRight,
CameraWithLowerRight,
}
pub enum ScreenScenes {
ScreenDefault,
ScreenWithUpperRight,
ScreenWithLowerRight,
}

View file

@ -0,0 +1,2 @@

6
src/tests/mod.rs Normal file
View file

@ -0,0 +1,6 @@
#[cfg(test)]
pub mod tests;
#[cfg(test)]
pub mod stream_states_tests;

View file

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

8
src/tests/tests.rs Normal file
View file

@ -0,0 +1,8 @@
#[test]
fn it_works() {
let result = 2 + 2;
assert_eq!(result, 4);
}
//Stream States Tests