test(derive): Unwrap, don't exit

This commit is contained in:
Ed Page 2023-01-09 20:52:06 -06:00
parent 9aa76fa12f
commit 7b69dea24f
3 changed files with 3 additions and 3 deletions

View file

@ -37,7 +37,7 @@ fn update_basic() {
let mut opt = Opt::try_parse_from(["test", "-a0"]).unwrap();
opt.update_from(["test", "-a42"]);
opt.try_update_from(["test", "-a42"]).unwrap();
assert_eq!(Opt { single_value: 42 }, opt);
}

View file

@ -35,7 +35,7 @@ fn boxed_flatten_subcommand() {
fn update_boxed_flatten_subcommand() {
let mut opt = Opt::try_parse_from(["test", "flame", "1"]).unwrap();
opt.update_from(["test", "flame", "42"]);
opt.try_update_from(["test", "flame", "42"]).unwrap();
assert_eq!(
Opt {

View file

@ -30,7 +30,7 @@ fn skip_1() {
);
opt.s = 42;
opt.update_from(["test", "-x", "22"]);
opt.try_update_from(["test", "-x", "22"]).unwrap();
assert_eq!(opt, Opt { x: 22, s: 42 });
}