Per-file units (use per-file settings for conversion functions) (#5064)
* Use the project default units for the per-file unit default values Signed-off-by: Nick Cameron <nrc@ncameron.org> * Use per-file units in conversion functions Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -16,7 +16,10 @@ mod test_examples_my_func {
|
||||
settings: Default::default(),
|
||||
context_type: crate::execution::ContextType::Mock,
|
||||
};
|
||||
if let Err(e) = ctx.run(program.into(), &mut crate::ExecState::new()).await {
|
||||
if let Err(e) = ctx
|
||||
.run(program.into(), &mut crate::ExecState::new(&ctx.settings))
|
||||
.await
|
||||
{
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
filename: format!("{}{}", "my_func", 0usize),
|
||||
@ -70,7 +73,10 @@ mod test_examples_my_func {
|
||||
settings: Default::default(),
|
||||
context_type: crate::execution::ContextType::Mock,
|
||||
};
|
||||
if let Err(e) = ctx.run(program.into(), &mut crate::ExecState::new()).await {
|
||||
if let Err(e) = ctx
|
||||
.run(program.into(), &mut crate::ExecState::new(&ctx.settings))
|
||||
.await
|
||||
{
|
||||
return Err(miette::Report::new(crate::errors::Report {
|
||||
error: e,
|
||||
filename: format!("{}{}", "my_func", 1usize),
|
||||
|
Reference in New Issue
Block a user