chore: refactor formatting tests

This changes the tests from normal assertions into snapshot tests, as
well as standardizing test names.
This commit is contained in:
Cainã Costa
2023-07-03 18:11:54 -03:00
committed by Lucas
parent 01be548752
commit c27ef8ad93
34 changed files with 612 additions and 481 deletions

View File

@@ -0,0 +1,25 @@
---
source: crates/aiken-lang/src/tests/format.rs
description: "Code:\n\npub fn foo(a) {\n if a { 14 } else { 42 }\n }\n\npub fn bar(xs) {\n list.map(xs, fn (x) { if x > 0 { \"foo\" } else { \"bar\" } })\n}\n"
---
pub fn foo(a) {
if a {
14
} else {
42
}
}
pub fn bar(xs) {
list.map(
xs,
fn(x) {
if x > 0 {
"foo"
} else {
"bar"
}
},
)
}