rustfmt previous commit

This commit is contained in:
Ava Hahn 2023-03-05 22:21:18 -08:00
parent dc6342bc74
commit ca9f755d50
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
10 changed files with 144 additions and 123 deletions

View file

@ -25,7 +25,10 @@ mod func_tests {
};
let args = Seg::from(Box::new(Ctr::Bool(true)), Box::new(Ctr::None));
syms.insert(String::from("test_func_in"), test_internal_func);
if let Ctr::Bool(b) = *syms.call_symbol(&"test_func_in".to_string(), &args, true).unwrap() {
if let Ctr::Bool(b) = *syms
.call_symbol(&"test_func_in".to_string(), &args, true)
.unwrap()
{
assert!(b)
}
}
@ -51,7 +54,10 @@ mod func_tests {
);
syms.insert(String::from("test_func_in"), test_external_func);
if let Ctr::Bool(b) = *syms.call_symbol(&"test_func_in".to_string(), &args, true).unwrap() {
if let Ctr::Bool(b) = *syms
.call_symbol(&"test_func_in".to_string(), &args, true)
.unwrap()
{
assert!(b)
}
}
@ -77,10 +83,13 @@ mod func_tests {
);
syms.insert(String::from("echo_2"), test_external_func);
assert_eq!(*syms.call_symbol(&"echo_2".to_string(), &args, true)
.unwrap()
.to_string(),
"'test'".to_string());
assert_eq!(
*syms
.call_symbol(&"echo_2".to_string(), &args, true)
.unwrap()
.to_string(),
"'test'".to_string()
);
}
#[test]
@ -122,10 +131,12 @@ mod func_tests {
let args = Seg::from(Box::new(Ctr::Bool(true)), Box::new(Ctr::None));
syms.insert(String::from("test_inner"), inner_func);
syms.insert(String::from("test_outer"), outer_func);
assert_eq!(syms.call_symbol(&"test_outer".to_string(), &args, true)
.unwrap()
.to_string(),
"'test'".to_string());
assert_eq!(
syms.call_symbol(&"test_outer".to_string(), &args, true)
.unwrap()
.to_string(),
"'test'".to_string()
);
}
#[test]
@ -241,8 +252,7 @@ mod func_tests {
syms.call_symbol(&"test_func_in".to_string(), &args, true)
.err()
.unwrap(),
"error in call to undefined-symbol: undefined symbol: undefined-symbol"
.to_string(),
"error in call to undefined-symbol: undefined symbol: undefined-symbol".to_string(),
);
}
}