use crate::error::ErrorType;
use crate::interpreter::test::make_interpreter_test;
make_interpreter_test!(
calls,
(
simple_call,
{ alias = upper(foo) },
{
fn alias() -> u32 {
1
}
},
{
fn FOO() -> u32 {
1
}
},
None,
),
(
nested_calls,
{ alias = lower(normalize(Foo::Bar)) },
{
fn alias() -> u32 {
1
}
},
{
fn foo_bar() -> u32 {
1
}
},
None,
),
(
mixed_args,
{ alias = concat(foo, _, normalize(bar::baz)) },
{
fn alias() -> u32 {
1
}
},
{
fn foo_bar_baz() -> u32 {
1
}
},
None,
),
(
wrong_num_args,
{ alias = lower(foo, bar) },
{
fn alias() -> u32 {
1
}
},
{},
Some(ErrorType::SignatureError),
),
(
missing_args,
{ alias = lower() },
{
fn alias() -> u32 {
1
}
},
{},
Some(ErrorType::SignatureError),
),
);