basic setup
This commit is contained in:
commit
a6cacbbd58
10 changed files with 81 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/target
|
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal 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
8
Cargo.toml
Normal 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
7
src/main.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
mod tests;
|
||||
mod modules;
|
||||
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
5
src/modules/mod.rs
Normal file
5
src/modules/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
pub mod stream_states {
|
||||
pub mod stream_states_class;
|
||||
pub mod enums;
|
||||
}
|
13
src/modules/stream_states/enums.rs
Normal file
13
src/modules/stream_states/enums.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
pub enum CameraScenes {
|
||||
CameraDefault,
|
||||
CameraWithUpperRight,
|
||||
CameraWithLargeUpperRight,
|
||||
CameraWithLowerRight,
|
||||
}
|
||||
|
||||
pub enum ScreenScenes {
|
||||
ScreenDefault,
|
||||
ScreenWithUpperRight,
|
||||
ScreenWithLowerRight,
|
||||
}
|
2
src/modules/stream_states/stream_states_class.rs
Normal file
2
src/modules/stream_states/stream_states_class.rs
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
|
6
src/tests/mod.rs
Normal file
6
src/tests/mod.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
#[cfg(test)]
|
||||
pub mod tests;
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod stream_states_tests;
|
24
src/tests/stream_states_tests.rs
Normal file
24
src/tests/stream_states_tests.rs
Normal 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
8
src/tests/tests.rs
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = 2 + 2;
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
|
||||
//Stream States Tests
|
Loading…
Reference in a new issue