Skip to content

Commit

Permalink
make failing test case for S-Expression creation/printing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-johnson-4 committed Dec 31, 2023
1 parent 75ace18 commit 0cff026
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/123.lm
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@

main := print "123"
main := (
print_s 123
);
10 changes: 10 additions & 0 deletions tests/c_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ fn compile_and_run(fp: &str) -> String {
fn cli_123() {
assert_eq!( compile_and_run("tests/123.lm"), "123" );
}

#[test]
fn cli_nil() {
assert_eq!( compile_and_run("tests/nil.lm"), "()" );
}

#[test]
fn cli_cons() {
assert_eq!( compile_and_run("tests/cons.lm"), "(123 . (() . 456))" );
}
4 changes: 4 additions & 0 deletions tests/cons.lm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

main := (
print_s (123 () 456)
);
4 changes: 4 additions & 0 deletions tests/nil.lm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

main := (
print_s ()
);

0 comments on commit 0cff026

Please sign in to comment.