//! # This is the image processing library for iOwO
//!
//! One of the design goals for this library is, however, to be a simple, generic image processing library.
//! For now, it's just indev... lets see what comes of it!
#![feature(lint_reasons)]

/// just some experiments, to test whether the architecture i want is even possible (or how to do it). probably temporary.
/// Gonna first try string processing...
pub mod experimental;

#[cfg(test)]
mod tests {
    use crate::experimental::{
        enum_based,
        trait_based::{self, data::io::Outputs},
    };

    #[test]
    fn test_enums() {
        let builder = enum_based::PipelineBuilder::new().insert(enum_based::Instruction::Uppercase);
        let upr = builder.build();
        let upr_lowr = builder.insert(enum_based::Instruction::Lowercase).build();

        assert_eq!(upr.run(String::from("Test")), String::from("TEST"));
        assert_eq!(upr_lowr.run(String::from("Test")), String::from("test"));
    }

    #[test]
    fn add() {
        let pipe = trait_based::pipeline::PipelineBuilder::new()
            .add(0)
            .stringify()
            .build();

        assert_eq!(
            pipe.run(vec![&2.into(), &3.into()].into()),
            Outputs(vec![String::from("5").into()])
        );
    }
}
