Some readme elaboration, but mostly cons

This commit is contained in:
Ava Hahn 2023-03-09 16:03:06 -08:00
parent 928c9b91ed
commit 001e35755d
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
5 changed files with 31 additions and 29 deletions

View file

@ -3,8 +3,8 @@ mod append_lib_tests {
use relish::stdlib::{dynamic_stdlib, static_stdlib};
#[test]
fn test_append_to_empty_list() {
let document = "(append () 1)";
fn test_cons_to_empty_list() {
let document = "(cons () 1)";
let result = "(1)";
let mut syms = SymTable::new();
@ -19,8 +19,8 @@ mod append_lib_tests {
}
#[test]
fn test_multi_append_to_empty_list() {
let document = "(append () 1 'two' 3.4)";
fn test_multi_cons_to_empty_list() {
let document = "(cons () 1 'two' 3.4)";
let result = "(1 'two' 3.4)";
let mut syms = SymTable::new();
@ -36,8 +36,8 @@ mod append_lib_tests {
}
#[test]
fn test_append_to_full_list() {
let document = "(append (1 2) 3)";
fn test_cons_to_full_list() {
let document = "(cons (1 2) 3)";
let result = "(1 2 3)";
let mut syms = SymTable::new();
@ -53,8 +53,8 @@ mod append_lib_tests {
}
#[test]
fn test_mono_append() {
let document = "(append)";
fn test_mono_cons() {
let document = "(cons)";
let result = "(<nil>)";
let mut syms = SymTable::new();
@ -70,8 +70,8 @@ mod append_lib_tests {
}
#[test]
fn test_append_no_list() {
let document = "(append 'test' 1 2 3)";
fn test_cons_no_list() {
let document = "(cons 'test' 1 2 3)";
let result = "('test' 1 2 3)";
let mut syms = SymTable::new();