aboutsummaryrefslogtreecommitdiffstats
path: root/awk/scheme
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2025-07-20 21:00:06 -0400
committerelioat <elioat@tilde.institute>2025-07-20 21:00:06 -0400
commitb7ad39a6e2d95970ba06c602a9a37ce57180d1c0 (patch)
treecf67f6c41e391b608d78f4b172f2af62f6fcbf2d /awk/scheme
parent917cbb7c1cf1ad951ab5ee285787af560ed18be5 (diff)
downloadtour-b7ad39a6e2d95970ba06c602a9a37ce57180d1c0.tar.gz
*
Diffstat (limited to 'awk/scheme')
-rw-r--r--awk/scheme/scheme/test/examples/calculator.scm4
-rw-r--r--awk/scheme/scheme/test/examples/list_utils.scm4
-rw-r--r--awk/scheme/scheme/test/examples/string_utils.scm4
-rw-r--r--awk/scheme/scheme/test/integration/basic_arithmetic.scm3
-rw-r--r--awk/scheme/scheme/test/integration/function_composition.scm5
-rw-r--r--awk/scheme/scheme/test/integration/list_operations.scm3
-rw-r--r--awk/scheme/scheme/test/integration/string_operations.scm3
-rw-r--r--awk/scheme/scheme/test/regression/edge_cases.scm9
-rw-r--r--awk/scheme/scheme/test/regression/nested_expressions.scm9
-rw-r--r--awk/scheme/scheme/test/unit/additional_lists.scm7
-rw-r--r--awk/scheme/scheme/test/unit/basic_stdlib_test.scm9
-rw-r--r--awk/scheme/scheme/test/unit/booleans.scm3
-rw-r--r--awk/scheme/scheme/test/unit/caddr_test.scm1
-rw-r--r--awk/scheme/scheme/test/unit/closures.scm3
-rw-r--r--awk/scheme/scheme/test/unit/control_flow.scm14
-rw-r--r--awk/scheme/scheme/test/unit/debug_define.scm3
-rw-r--r--awk/scheme/scheme/test/unit/debug_define_list.scm2
-rw-r--r--awk/scheme/scheme/test/unit/debug_list_call.scm3
-rw-r--r--awk/scheme/scheme/test/unit/debug_list_empty.scm3
-rw-r--r--awk/scheme/scheme/test/unit/debug_list_simple.scm5
-rw-r--r--awk/scheme/scheme/test/unit/debug_member.scm5
-rw-r--r--awk/scheme/scheme/test/unit/debug_split.scm3
-rw-r--r--awk/scheme/scheme/test/unit/functions.scm3
-rw-r--r--awk/scheme/scheme/test/unit/inc_alias_test.scm11
-rw-r--r--awk/scheme/scheme/test/unit/lambdas.scm3
-rw-r--r--awk/scheme/scheme/test/unit/let.scm3
-rw-r--r--awk/scheme/scheme/test/unit/lists.scm3
-rw-r--r--awk/scheme/scheme/test/unit/numbers.scm5
-rw-r--r--awk/scheme/scheme/test/unit/simple_additional_lists.scm5
29 files changed, 20 insertions, 118 deletions
diff --git a/awk/scheme/scheme/test/examples/calculator.scm b/awk/scheme/scheme/test/examples/calculator.scm
index 25a4372..43895ff 100644
--- a/awk/scheme/scheme/test/examples/calculator.scm
+++ b/awk/scheme/scheme/test/examples/calculator.scm
@@ -1,12 +1,10 @@
-; Example: Simple calculator
-; Demonstrates function definitions and arithmetic
+; Function definitions and arithmetic
(define add (x y) (+ x y))
(define subtract (x y) (- x y))
(define multiply (x y) (* x y))
(define divide (x y) (/ x y))
-; Test the calculator
(add 10 5)
(subtract 10 5)
(multiply 10 5)
diff --git a/awk/scheme/scheme/test/examples/list_utils.scm b/awk/scheme/scheme/test/examples/list_utils.scm
index 39d97b6..19d7299 100644
--- a/awk/scheme/scheme/test/examples/list_utils.scm
+++ b/awk/scheme/scheme/test/examples/list_utils.scm
@@ -1,5 +1,4 @@
-; Example: List utilities
-; Demonstrates list operations and function definitions
+; List operations and function definitions
(define make-pair (x y) (cons x y))
(define make-triple (x y z) (cons x (cons y (cons z nil))))
@@ -8,7 +7,6 @@
(define third (lst) (car (cdr (cdr lst))))
(define rest (lst) (cdr lst))
-; Test list utilities
(make-pair 1 2)
(first (make-pair 1 2))
(rest (make-pair 1 2))
diff --git a/awk/scheme/scheme/test/examples/string_utils.scm b/awk/scheme/scheme/test/examples/string_utils.scm
index 1da96dd..6973922 100644
--- a/awk/scheme/scheme/test/examples/string_utils.scm
+++ b/awk/scheme/scheme/test/examples/string_utils.scm
@@ -1,5 +1,4 @@
-; Example: String utilities
-; Demonstrates string operations and function composition
+; String operations and function composition
(define greet (name) (string-append "Hello, " name "!"))
(define shout (message) (string-append message "!!!"))
@@ -7,7 +6,6 @@
(define first-char (text) (string-ref text 0))
(define last-char (text) (string-ref text (- (string-length text) 1)))
-; Test the string utilities
(greet "World")
(shout "Hello")
(count-chars "Hello World")
diff --git a/awk/scheme/scheme/test/integration/basic_arithmetic.scm b/awk/scheme/scheme/test/integration/basic_arithmetic.scm
index 6d8ab77..f2ee0ca 100644
--- a/awk/scheme/scheme/test/integration/basic_arithmetic.scm
+++ b/awk/scheme/scheme/test/integration/basic_arithmetic.scm
@@ -1,5 +1,4 @@
-; Integration test: Basic arithmetic with variables
-; Tests compilation and execution of arithmetic expressions
+; Strive to tests compilation and the execution of arithmetic expressions
(define a 10)
(define b 5)
diff --git a/awk/scheme/scheme/test/integration/function_composition.scm b/awk/scheme/scheme/test/integration/function_composition.scm
index d26fb91..7009888 100644
--- a/awk/scheme/scheme/test/integration/function_composition.scm
+++ b/awk/scheme/scheme/test/integration/function_composition.scm
@@ -1,5 +1,4 @@
-; Integration test: Function composition
-; Tests defining and using functions together
+; Defining and using functions together
(define add (x y) (+ x y))
(define multiply (x y) (* x y))
@@ -7,4 +6,4 @@
(define add-square (x y) (add (square x) (square y)))
(add-square 3 4)
(define result (add-square 5 12))
-result \ No newline at end of file
+result \ No newline at end of file
diff --git a/awk/scheme/scheme/test/integration/list_operations.scm b/awk/scheme/scheme/test/integration/list_operations.scm
index 4612bd3..3a82919 100644
--- a/awk/scheme/scheme/test/integration/list_operations.scm
+++ b/awk/scheme/scheme/test/integration/list_operations.scm
@@ -1,5 +1,4 @@
-; Integration test: List operations with functions
-; Tests list operations combined with function definitions
+; List operations and function definitions
(define make-list (x y z) (cons x (cons y (cons z nil))))
(define first (lst) (car lst))
diff --git a/awk/scheme/scheme/test/integration/string_operations.scm b/awk/scheme/scheme/test/integration/string_operations.scm
index f9f2f6d..72a19d9 100644
--- a/awk/scheme/scheme/test/integration/string_operations.scm
+++ b/awk/scheme/scheme/test/integration/string_operations.scm
@@ -1,5 +1,4 @@
-; Integration test: String operations with variables
-; Tests string operations combined with variable bindings
+; String operations and variable bindings
(define greeting "Hello")
(define name "World")
diff --git a/awk/scheme/scheme/test/regression/edge_cases.scm b/awk/scheme/scheme/test/regression/edge_cases.scm
index 5aa111b..7794ede 100644
--- a/awk/scheme/scheme/test/regression/edge_cases.scm
+++ b/awk/scheme/scheme/test/regression/edge_cases.scm
@@ -1,11 +1,10 @@
-; Regression tests: Edge cases
-; Tests that might catch regressions
+; Tests that might catch regressions ¯\_༼ ಠ_ಠ ༽_/¯
-; Empty string operations
+; Empty string
(string-length "")
(string-append "" "")
-; Single character operations
+; Single character
(string-length "a")
(string-ref "a" 0)
@@ -15,7 +14,7 @@
(* 0 5)
(/ 0 5)
-; Nil operations
+; Nil
nil
(cons 1 nil)
(car (cons 1 nil))
diff --git a/awk/scheme/scheme/test/regression/nested_expressions.scm b/awk/scheme/scheme/test/regression/nested_expressions.scm
index 7ad04a7..c564f29 100644
--- a/awk/scheme/scheme/test/regression/nested_expressions.scm
+++ b/awk/scheme/scheme/test/regression/nested_expressions.scm
@@ -1,20 +1,15 @@
-; Regression tests: Nested expressions
-; Tests complex nested expressions that might cause issues
+; Nested expressions that have caused issues before
-; Deeply nested arithmetic
(+ (+ (+ 1 2) (+ 3 4)) (+ (+ 5 6) (+ 7 8)))
-; Nested function calls
(define add (x y) (+ x y))
(define double (x) (* x 2))
(double (add 3 4))
-; Nested let expressions
(let ((x 10))
(let ((y 20))
(let ((z 30))
(+ x (+ y z)))))
-; Nested string operations
(string-append "a" (string-append "b" "c"))
-(string-length (string-append "hello" " world")) \ No newline at end of file
+(string-length (string-append "hello" " banana")) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/additional_lists.scm b/awk/scheme/scheme/test/unit/additional_lists.scm
index e7b5bc4..369f26d 100644
--- a/awk/scheme/scheme/test/unit/additional_lists.scm
+++ b/awk/scheme/scheme/test/unit/additional_lists.scm
@@ -1,21 +1,17 @@
-;; Additional List Utilities Tests
-;; Phase 3: More list utilities
+;; Even more list utilities
-;; Test list function
(list)
(list 1)
(list 1 2)
(list 1 2 3)
(list "a" "b" "c")
-;; Test reverse function
(reverse nil)
(reverse (list 1))
(reverse (list 1 2))
(reverse (list 1 2 3))
(reverse (list "a" "b" "c"))
-;; Test member function
(member 1 nil)
(member 1 (list 1))
(member 2 (list 1 2 3))
@@ -23,7 +19,6 @@
(member "a" (list "a" "b" "c"))
(member "d" (list "a" "b" "c"))
-;; Test combinations
(reverse (list 1 2 3))
(member 2 (reverse (list 1 2 3)))
(list (car (member 2 (list 1 2 3))) (cadr (member 2 (list 1 2 3)))) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/basic_stdlib_test.scm b/awk/scheme/scheme/test/unit/basic_stdlib_test.scm
index 1029ab6..da6bbbe 100644
--- a/awk/scheme/scheme/test/unit/basic_stdlib_test.scm
+++ b/awk/scheme/scheme/test/unit/basic_stdlib_test.scm
@@ -1,13 +1,4 @@
-;; Basic test for standard library functions
-
-;; Test null? function
(null? nil)
-
-;; Test pair? function
(pair? (cons 1 2))
-
-;; Test length function
(length (cons 1 (cons 2 nil)))
-
-;; Test cadr function
(cadr (cons 1 (cons 2 (cons 3 nil)))) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/booleans.scm b/awk/scheme/scheme/test/unit/booleans.scm
index 539eea1..a7367c6 100644
--- a/awk/scheme/scheme/test/unit/booleans.scm
+++ b/awk/scheme/scheme/test/unit/booleans.scm
@@ -1,6 +1,3 @@
-; Unit tests for boolean operations
-; Test comparison operations
-
(= 1 1)
(= 1 2)
(< 1 2)
diff --git a/awk/scheme/scheme/test/unit/caddr_test.scm b/awk/scheme/scheme/test/unit/caddr_test.scm
index ac51c6f..66e0988 100644
--- a/awk/scheme/scheme/test/unit/caddr_test.scm
+++ b/awk/scheme/scheme/test/unit/caddr_test.scm
@@ -1,2 +1 @@
-;; Test caddr function specifically
(caddr (cons 1 (cons 2 (cons 3 nil)))) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/closures.scm b/awk/scheme/scheme/test/unit/closures.scm
index 9bdc90a..7f3c5ec 100644
--- a/awk/scheme/scheme/test/unit/closures.scm
+++ b/awk/scheme/scheme/test/unit/closures.scm
@@ -1,6 +1,3 @@
-; Unit tests for closures
-; Test closure creation and variable capture
-
(let ((x 10)) ((lambda (y) (+ x y)) 32))
(let ((add1 (lambda (x) (+ x 1)))) (add1 41))
(let ((x 5)) (let ((f (lambda (y) (+ x y)))) (f 10))) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/control_flow.scm b/awk/scheme/scheme/test/unit/control_flow.scm
index 9c13e16..0e20518 100644
--- a/awk/scheme/scheme/test/unit/control_flow.scm
+++ b/awk/scheme/scheme/test/unit/control_flow.scm
@@ -1,7 +1,3 @@
-;; Control Flow Constructs Tests
-;; Phase 2: Control flow utilities
-
-;; Test if expressions
(if #t "true" "false")
(if #f "true" "false")
(if 0 "true" "false")
@@ -9,7 +5,6 @@
(if nil "true" "false")
(if (cons 1 2) "true" "false")
-;; Test cond expressions
(cond (#t "first")
(#f "second")
(else "else"))
@@ -22,7 +17,6 @@
(#f "second")
(else "else"))
-;; Test and expressions
(and)
(and #t)
(and #f)
@@ -33,7 +27,6 @@
(and #t #t #t)
(and #t #f #t)
-;; Test or expressions
(or)
(or #t)
(or #f)
@@ -44,7 +37,6 @@
(or #f #f #t)
(or #f #f #f)
-;; Test not expressions
(not #t)
(not #f)
(not 0)
@@ -52,16 +44,16 @@
(not nil)
(not (cons 1 2))
-;; Test nested control flow
+;; Nested control flow
(if (and #t #f) "and-true" "and-false")
(if (or #f #t) "or-true" "or-false")
(if (not #t) "not-true" "not-false")
-;; Test complex conditions
+;; Complexish conditions
(cond ((and #t #t) "and-true")
((or #f #f) "or-false")
(else "else"))
-;; Test short-circuit evaluation
+;; Short-circuit evaluation
(and #f (error "should not evaluate"))
(or #t (error "should not evaluate")) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_define.scm b/awk/scheme/scheme/test/unit/debug_define.scm
index ecfddf6..f22847d 100644
--- a/awk/scheme/scheme/test/unit/debug_define.scm
+++ b/awk/scheme/scheme/test/unit/debug_define.scm
@@ -1,5 +1,2 @@
-;; Debug define issue
-
-;; Test simple variable definition
(define x 42)
x \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_define_list.scm b/awk/scheme/scheme/test/unit/debug_define_list.scm
index 1428949..e8a796b 100644
--- a/awk/scheme/scheme/test/unit/debug_define_list.scm
+++ b/awk/scheme/scheme/test/unit/debug_define_list.scm
@@ -1,5 +1,3 @@
;; Debug define with list
-
-;; Test define with list
(define mylist (list 1))
mylist \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_list_call.scm b/awk/scheme/scheme/test/unit/debug_list_call.scm
index 6b58296..a96b26c 100644
--- a/awk/scheme/scheme/test/unit/debug_list_call.scm
+++ b/awk/scheme/scheme/test/unit/debug_list_call.scm
@@ -1,4 +1 @@
-;; Debug list call parsing
-
-;; Test direct list call
(list 1) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_list_empty.scm b/awk/scheme/scheme/test/unit/debug_list_empty.scm
index 0c0e32d..91e616b 100644
--- a/awk/scheme/scheme/test/unit/debug_list_empty.scm
+++ b/awk/scheme/scheme/test/unit/debug_list_empty.scm
@@ -1,4 +1 @@
-;; Debug empty list
-
-;; Test empty list
(list) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_list_simple.scm b/awk/scheme/scheme/test/unit/debug_list_simple.scm
index cec8d50..009e62b 100644
--- a/awk/scheme/scheme/test/unit/debug_list_simple.scm
+++ b/awk/scheme/scheme/test/unit/debug_list_simple.scm
@@ -1,7 +1,2 @@
-;; Debug list function
-
-;; Test with one element
(list 1)
-
-;; Test with two elements
(list 1 2) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_member.scm b/awk/scheme/scheme/test/unit/debug_member.scm
index 77633cf..68bb943 100644
--- a/awk/scheme/scheme/test/unit/debug_member.scm
+++ b/awk/scheme/scheme/test/unit/debug_member.scm
@@ -1,7 +1,2 @@
-;; Debug member function issue
-
-;; Test list creation first
(list 1)
-
-;; Test member with simple values
(member 1 (list 1)) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/debug_split.scm b/awk/scheme/scheme/test/unit/debug_split.scm
index 43c9e1e..4d1eeb7 100644
--- a/awk/scheme/scheme/test/unit/debug_split.scm
+++ b/awk/scheme/scheme/test/unit/debug_split.scm
@@ -1,4 +1 @@
-;; Debug expression splitting
-
-;; Test simple function call
(list 1 2 3) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/functions.scm b/awk/scheme/scheme/test/unit/functions.scm
index 8d788c7..43b3a71 100644
--- a/awk/scheme/scheme/test/unit/functions.scm
+++ b/awk/scheme/scheme/test/unit/functions.scm
@@ -1,6 +1,3 @@
-; Unit tests for function definitions
-; Test function definition and calls
-
(define add (x y) (+ x y))
(add 2 3)
(define double (x) (* x 2))
diff --git a/awk/scheme/scheme/test/unit/inc_alias_test.scm b/awk/scheme/scheme/test/unit/inc_alias_test.scm
index 54b1cfa..cf7ae94 100644
--- a/awk/scheme/scheme/test/unit/inc_alias_test.scm
+++ b/awk/scheme/scheme/test/unit/inc_alias_test.scm
@@ -1,7 +1,3 @@
-;; Test for inc function and ++ alias
-;; This test verifies that both inc and ++ work as increment functions
-
-;; Test basic inc function
(assert (= (inc 41) 42))
(assert (= (inc 0) 1))
(assert (= (inc -1) 0))
@@ -11,12 +7,7 @@
(assert (= (++ 0) 1))
(assert (= (++ -1) 0))
-;; Test that both functions are equivalent
+;; Test that both inc and ++ are the same function
(assert (= (inc 10) (++ 10)))
-
-;; Test with larger numbers
(assert (= (inc 999) 1000))
(assert (= (++ 999) 1000))
-
-;; Test error handling for non-numeric arguments
-;; (This would be tested in a separate error test file) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/lambdas.scm b/awk/scheme/scheme/test/unit/lambdas.scm
index f727253..a287b47 100644
--- a/awk/scheme/scheme/test/unit/lambdas.scm
+++ b/awk/scheme/scheme/test/unit/lambdas.scm
@@ -1,6 +1,3 @@
-; Unit tests for lambda functions
-; Test anonymous function creation and calls
-
((lambda (x) (+ x 1)) 41)
((lambda (x y) (+ x y)) 20 22)
(define add1 (lambda (x) (+ x 1)))
diff --git a/awk/scheme/scheme/test/unit/let.scm b/awk/scheme/scheme/test/unit/let.scm
index 4643e81..f3fa367 100644
--- a/awk/scheme/scheme/test/unit/let.scm
+++ b/awk/scheme/scheme/test/unit/let.scm
@@ -1,6 +1,3 @@
-; Unit tests for let expressions
-; Test local variable bindings
-
(let ((x 10) (y 20)) (+ x y))
(let ((x 5)) (* x x))
(let ((x 10)) (let ((y 20)) (+ x y))) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/lists.scm b/awk/scheme/scheme/test/unit/lists.scm
index 04ad89b..bc7b7f4 100644
--- a/awk/scheme/scheme/test/unit/lists.scm
+++ b/awk/scheme/scheme/test/unit/lists.scm
@@ -1,6 +1,3 @@
-; Unit tests for list operations
-; Test cons, car, cdr operations
-
(cons 1 2)
(car (cons 1 2))
(cdr (cons 1 2))
diff --git a/awk/scheme/scheme/test/unit/numbers.scm b/awk/scheme/scheme/test/unit/numbers.scm
index 8919946..b4f255c 100644
--- a/awk/scheme/scheme/test/unit/numbers.scm
+++ b/awk/scheme/scheme/test/unit/numbers.scm
@@ -1,6 +1,3 @@
-; Unit tests for number operations
-; Test basic arithmetic operations
-
(+ 1 2)
(+ 10 20 30)
(- 10 5)
@@ -9,4 +6,4 @@
(* 2 3 4)
(/ 10 2)
(/ 20 4 2)
-(add1 41) \ No newline at end of file
+(inc 41) \ No newline at end of file
diff --git a/awk/scheme/scheme/test/unit/simple_additional_lists.scm b/awk/scheme/scheme/test/unit/simple_additional_lists.scm
index dc589ff..e75c2bb 100644
--- a/awk/scheme/scheme/test/unit/simple_additional_lists.scm
+++ b/awk/scheme/scheme/test/unit/simple_additional_lists.scm
@@ -1,14 +1,9 @@
-;; Simple Additional List Utilities Tests
-
-;; Test list function
(list)
(list 1)
(list 1 2)
-;; Test reverse function
(reverse nil)
(reverse (list 1))
-;; Test member function
(member 1 nil)
(member 1 (list 1)) \ No newline at end of file