Minor formatting

This commit is contained in:
Patrick Lühne 2020-04-01 11:10:04 +02:00
parent e4fe047aba
commit 57d568916f
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 13 additions and 9 deletions

View File

@ -418,8 +418,7 @@ pub(crate) mod tests
assert_eq!(format(
function("f", vec![constant("a"), constant("b"), constant("c")])),
"f(a, b, c)");
assert_eq!(format(
function("function", vec![constant("a"), constant("b"), constant("c")])),
assert_eq!(format(function("function", vec![constant("a"), constant("b"), constant("c")])),
"function(a, b, c)");
assert_eq!(format(
@ -521,11 +520,14 @@ pub(crate) mod tests
#[test]
fn format_combination_integer_and_lower()
{
assert_eq!(format(function("f", vec![integer(0), integer(0), integer(0)])),
assert_eq!(format(
function("f", vec![integer(0), integer(0), integer(0)])),
"f(0, 0, 0)");
assert_eq!(format(function("f", vec![integer(10000), integer(10000), integer(10000)])),
assert_eq!(format(
function("f", vec![integer(10000), integer(10000), integer(10000)])),
"f(10000, 10000, 10000)");
assert_eq!(format(function("f", vec![integer(-10000), integer(-10000), integer(-10000)])),
assert_eq!(format(
function("f", vec![integer(-10000), integer(-10000), integer(-10000)])),
"f(-10000, -10000, -10000)");
assert_eq!(format(absolute_value(integer(0))), "|0|");
@ -564,12 +566,14 @@ pub(crate) mod tests
#[test]
fn format_combination_string_and_lower()
{
assert_eq!(format(function("f", vec![string(""), string(""), string("")])),
assert_eq!(format(
function("f", vec![string(""), string(""), string("")])),
"f(\"\", \"\", \"\")");
assert_eq!(format(function("f", vec![string("test 123"), string("test 123"),
string("test 123")])),
assert_eq!(format(
function("f", vec![string("test 123"), string("test 123"), string("test 123")])),
"f(\"test 123\", \"test 123\", \"test 123\")");
assert_eq!(format(function("f", vec![string("\\a\nb🙂c\t"), string("\\a\nb🙂c\t"),
assert_eq!(format(
function("f", vec![string("\\a\nb🙂c\t"), string("\\a\nb🙂c\t"),
string("\\a\nb🙂c\t")])),
"f(\"\\\\a\\nb🙂c\\t\", \"\\\\a\\nb🙂c\\t\", \"\\\\a\\nb🙂c\\t\")");