diff --git a/src/code.rs b/src/code.rs index 1c72952..9c507af 100644 --- a/src/code.rs +++ b/src/code.rs @@ -198,3 +198,18 @@ pub fn program2gcode(p: &Program, mut w: W) -> io::Result<()> { } Ok(()) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_validate_gcode() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_program2gcode() { + panic!("TODO: basic passing test"); + } +} diff --git a/src/machine.rs b/src/machine.rs index b6e1c6c..3ecda79 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -1,6 +1,4 @@ -/// State machine used to generate gcode for various operations. -/// -/// TODO: more detailed examples +/// TODO: Documentation use crate::code::*; @@ -92,3 +90,33 @@ impl Machine { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_tool_on() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_tool_off() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_distance() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_absolute() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_incremental() { + panic!("TODO: basic passing test"); + } +} diff --git a/src/main.rs b/src/main.rs index 21e887c..6f0f187 100644 --- a/src/main.rs +++ b/src/main.rs @@ -313,3 +313,18 @@ fn length_to_mm(l: svgdom::Length, dpi: f64) -> f64 { length.get::() } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_svg2program() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_length_to_mm() { + panic!("TODO: basic passing test"); + } +} diff --git a/src/turtle.rs b/src/turtle.rs index cc97954..5f75c97 100644 --- a/src/turtle.rs +++ b/src/turtle.rs @@ -185,6 +185,7 @@ impl Turtle { } // TODO: Documentation + // TODO: Function too long pub fn cubic_bezier( &mut self, abs: bool, @@ -430,3 +431,73 @@ impl Turtle { self.initpos = self.curpos; } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_move_to() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_close() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_line() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_bezier() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_cubic_bezier() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_smooth_cubic_bezier() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_smooth_quadratic_bezier() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_quadratic_bezier() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_elliptical() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_stack_scaling() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_push_transform() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_pop_transform() { + panic!("TODO: basic passing test"); + } + + #[test] + fn test_reset() { + panic!("TODO: basic passing test"); + } +}