shithub: femtolisp

Download patch

ref: 449141670bde8dc87ae561306eee252e90a3bae2
parent: f7b53020ad8d6fcde7e963958e00598522c8c8ca
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Thu Nov 28 23:50:36 EST 2024

bring back torture test (longer running) with breaking part disabled

--- a/meson.build
+++ b/meson.build
@@ -221,7 +221,6 @@
 test('mp.lsp', flisp, args: ['mp.lsp'], workdir: tests_dir)
 test('perf.lsp', flisp, args: ['perf.lsp'], workdir: tests_dir, timeout: -1)
 test('tme.lsp', flisp, args: ['tme.lsp'], workdir: tests_dir)
-# FIXME https://todo.sr.ht/~ft/femtolisp/2
-#test('torture.lsp', flisp, args: ['torture.scm'], workdir: tests_dir, timeout: -1)
+test('torture.lsp', flisp, args: ['torture.scm'], workdir: tests_dir, timeout: -1)
 test('torus.lsp', flisp, args: ['torus.lsp'], workdir: tests_dir)
 test('unit.lsp', flisp, args: ['unittest.lsp'], workdir: tests_dir)
--- a/test/mkfile
+++ b/test/mkfile
@@ -1,4 +1,3 @@
 test:QV:
-	# torture.scm is disabled until https://todo.sr.ht/~ft/femtolisp/2 is done
-	for(t in unittest.lsp argv.lsp hashtest.lsp torus.lsp tme.lsp mp.lsp perf.lsp) # torture.scm)
+	for(t in unittest.lsp argv.lsp hashtest.lsp torus.lsp tme.lsp mp.lsp perf.lsp torture.scm)
 		../$O.out $t
--- a/test/torture.scm
+++ b/test/torture.scm
@@ -1,4 +1,4 @@
-(define ones (map (λ (x) 1) (iota 1000000)))
+(define ones (map (λ (x) 1) (iota 10000000)))
 
 (write (apply + ones))
 (newline)
@@ -8,17 +8,13 @@
       0
       `(+ 1 1 1 1 1 1 1 1 1 1 ,(big (- n 1)))))
 
-(define nst (big 100000))
+; https://todo.sr.ht/~ft/femtolisp/2
+;(define nst (big 100000))
+;(write (eval nst))
+;(newline)
 
-(write (eval nst))
-(newline)
-
 (define longg (cons '+ ones))
 (write (eval longg))
 (newline)
 
-(define (f x)
-  (begin (write x)
-	 (newline)
-	 (f (+ x 1))
-	 0))
+(*vm-stats*)