Some readme elaboration, but mostly cons
This commit is contained in:
parent
928c9b91ed
commit
001e35755d
5 changed files with 31 additions and 29 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue