Added LT, GT, LTE, and GTE functions, and big test coverage

This commit is contained in:
Ava Hahn 2023-03-07 22:01:01 -08:00
parent 5d89c6b684
commit c74d6f5ddf
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
6 changed files with 468 additions and 11 deletions

View file

@ -145,7 +145,7 @@ impl Args {
} else {
return Err("expected no args".to_string());
}
},
}
Args::Infinite => {
if !args.is_empty() {
@ -153,7 +153,7 @@ impl Args {
} else {
return Err("expected args but none were provided".to_string());
}
},
}
Args::Lazy(ref num) => {
let called_arg_count = args.len();
@ -168,7 +168,7 @@ impl Args {
} else if let Ctr::None = *args.car {
return Err(format!("expected {} args. Got 0.", num,));
}
},
}
Args::Strict(ref arg_types) => {
let mut idx: usize = 0;
@ -203,7 +203,7 @@ impl Args {
return Err("too few arguments".to_string());
}
}
},
}
}
Ok(())