From 5293a6c6379d8a6d3eeb4f4eb092bc5f963cd27e Mon Sep 17 00:00:00 2001 From: slava Date: Thu, 16 Nov 2006 05:26:43 +0000 Subject: [PATCH] Stack trace unit test --- TODO.FACTOR.txt | 2 ++ library/compiler/load.factor | 1 + library/compiler/test/stack-trace.factor | 12 ++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 library/compiler/test/stack-trace.factor diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 2f34a4e02e..649eb14643 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -35,6 +35,8 @@ - overhaul models, set-model* is crap - fix windows gcc issue - robustify stepper -- see if step back past a throw works +- httpd crash +- fep when closing window + ui: diff --git a/library/compiler/load.factor b/library/compiler/load.factor index 57392a0e0c..9b00998e50 100644 --- a/library/compiler/load.factor +++ b/library/compiler/load.factor @@ -64,4 +64,5 @@ PROVIDE: library/compiler "test/optimizer.factor" "test/alien.factor" "test/callbacks.factor" + "test/stack-trace.factor" } } ; diff --git a/library/compiler/test/stack-trace.factor b/library/compiler/test/stack-trace.factor new file mode 100644 index 0000000000..0b797f15d6 --- /dev/null +++ b/library/compiler/test/stack-trace.factor @@ -0,0 +1,12 @@ +IN: temporary +USING: errors compiler test namespaces sequences ; + +: foo 3 throw 7 ; +: bar foo 4 ; +: baz bar 5 ; +\ baz compile +[ 3 ] [ [ baz ] catch ] unit-test +[ { foo bar baz } ] [ + error-stack-trace get symbolic-stack-trace + [ second ] map [ ] subset +] unit-test