Projects STRLCPY cfonts Commits 778ed2c7
🤬
  • ■ ■ ■ ■ ■ ■
    rust/src/config.rs
    skipped 305 lines
    306 306  }
    307 307   
    308 308  /// The type of options our [`CLIOPTIONS`] can have
    309  -#[derive(Debug, Clone, PartialEq)]
     309 +#[derive(Clone, PartialEq)]
    310 310  pub enum OptionType {
    311 311   /// There is only one text option which is for the text
    312 312   Text,
    skipped 16 lines
    329 329  }
    330 330   
    331 331  /// The struct of a single option inside our [`CLIOPTIONS`]
    332  -#[derive(Debug, Clone, PartialEq)]
     332 +#[derive(Clone, PartialEq)]
    333 333  pub struct CliOption<'a> {
    334 334   /// The key of this option so we can address it later
    335 335   pub key: &'a str,
    skipped 164 lines
  • ■ ■ ■ ■ ■ ■
    rust/tests/config_test.rs
     1 +extern crate cfonts;
     2 + 
     3 +use cfonts::config::{Align, BgColors, Colors, Env, Fonts, OptionType, Options, CLIOPTIONS};
     4 + 
     5 +#[cfg(test)]
     6 +mod tests {
     7 + use super::*;
     8 + 
     9 + #[test]
     10 + fn clone_traits_work() {
     11 + let _fonts = Fonts::FontConsole.clone();
     12 + let _colors = Colors::System.clone();
     13 + let _bgcolors = BgColors::Transparent.clone();
     14 + let _env = Env::Cli.clone();
     15 + let _align = Align::Top.clone();
     16 + let options = Options::default();
     17 + let options2 = options.clone();
     18 + assert!(options == options2);
     19 + }
     20 + 
     21 + #[test]
     22 + fn equality_works() {
     23 + assert!(OptionType::Text == OptionType::Text);
     24 + assert!(CLIOPTIONS[0] == CLIOPTIONS[0]);
     25 + }
     26 +}
     27 + 
Please wait...
Page is in error, reload to recover