[uim-commit] r2823 - in branches/r5rs/sigscheme: . test

yamaken at freedesktop.org yamaken at freedesktop.org
Fri Jan 6 17:49:40 PST 2006


Author: yamaken
Date: 2006-01-06 17:49:36 -0800 (Fri, 06 Jan 2006)
New Revision: 2823

Modified:
   branches/r5rs/sigscheme/eval.c
   branches/r5rs/sigscheme/test/test-syntax.scm
Log:
* sigscheme/eval.c
  - (call): Fix lacking mandatory error check for invalid function
    calling
* sigscheme/test/test-syntax.scm
  - Add tests for the fix


Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c	2006-01-07 01:20:07 UTC (rev 2822)
+++ branches/r5rs/sigscheme/eval.c	2006-01-07 01:49:36 UTC (rev 2823)
@@ -275,7 +275,7 @@
             scm_call_continuation(proc, cont);
             /* NOTREACHED */
         }
-        SCM_ASSERT(scm_false);
+        ERR("procedure or syntax required but got", proc);
     }
 
     /* We have a C function. */

Modified: branches/r5rs/sigscheme/test/test-syntax.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-syntax.scm	2006-01-07 01:20:07 UTC (rev 2822)
+++ branches/r5rs/sigscheme/test/test-syntax.scm	2006-01-07 01:49:36 UTC (rev 2823)
@@ -180,6 +180,14 @@
   (assert "dot pair without both space" "(\"foo\".\"bar\")")
   (assert "dot pair without both space" "(\"foo\" \"bar\".\"baz\")"))
 
+(assert-error "invalid function calling: boolean" (lambda () (#t)))
+(assert-error "invalid function calling: integer" (lambda () (1)))
+(assert-error "invalid function calling: null"    (lambda () ('())))
+(assert-error "invalid function calling: pair"    (lambda () ('(1 2))))
+(assert-error "invalid function calling: char"    (lambda () (#\a)))
+(assert-error "invalid function calling: string"  (lambda () ("a")))
+(assert-error "invalid function calling: vector"  (lambda () (#(1))))
+
 (tn "function calling fixed_0")
 (define f (lambda () #t))
 (assert-equal? (tn) #t         (f))



More information about the uim-commit mailing list