Skip to main content

test_list

Macro test_list 

Source
macro_rules! test_list {
    [$($entry:expr),* $(,)?] => { ... };
}
Expand description

Helper macro for constructing [Value::List] instances for use in tests and Exampless.

let test = test_list![
    "abc",
    42,
    true,
];

let expected = Value::test_list(vec![
    Value::test_string("abc"),
    Value::test_int(42),
    Value::test_bool(true),
]);

assert_eq!(test, expected);