aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/parser/test.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-24 06:58:09 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-24 06:58:09 +0800
commitdc13fa58448b7e267fb0ba63427534127f76beca (patch)
tree7219f10bf3da22fdbe2cf4f41719505dcb75d6d2 /mingling/src/parser/test.rs
parentdd6253ba8c37b51927ab4dc0e71f5b3a264f36b3 (diff)
Move flag tests to separate module and clean up deref patterns
Diffstat (limited to 'mingling/src/parser/test.rs')
-rw-r--r--mingling/src/parser/test.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/mingling/src/parser/test.rs b/mingling/src/parser/test.rs
index f89796e..29a074d 100644
--- a/mingling/src/parser/test.rs
+++ b/mingling/src/parser/test.rs
@@ -367,10 +367,11 @@ fn test_picker_pick_i32_default_zero() {
#[test]
fn test_picker_pick_f64() {
- let result: f64 = Picker::new(vec!["--ratio", "3.14"])
+ let result: f64 = Picker::new(vec!["--ratio", "5.16"])
.pick("--ratio")
.unpack();
- assert!((result - 3.14).abs() < 1e-10);
+ let expected: f64 = 5.16;
+ assert!((result - expected).abs() < 1e-10);
}
#[test]
@@ -721,7 +722,7 @@ fn test_picker_operate_args_transform() {
.operate_args(|mut args| {
// Add an extra file
args.push("d.txt".to_string());
- args.into()
+ args
})
.pick::<Vec<String>>("--files")
.unpack();