test: add empty list test

This commit is contained in:
rvcas
2023-06-30 16:12:51 -04:00
parent 291dedf4e8
commit 8a7df7f66b
13 changed files with 187 additions and 148 deletions

View File

@@ -27,3 +27,16 @@ pub fn parser(
tail,
})
}
#[cfg(test)]
mod tests {
use chumsky::Parser;
use crate::assert_expr;
#[test]
fn empty_list() {
assert_expr!("[]");
}
}

View File

@@ -0,0 +1,9 @@
---
source: crates/aiken-lang/src/parser/expr/list.rs
description: "Code:\n\n[]"
---
List {
location: 0..2,
elements: [],
tail: None,
}