[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-178-g15993
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-178-g15993bc |
Date: |
Mon, 11 Apr 2011 16:01:11 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=15993bce1cd0a2e69f11a6ac1725fa7a219c5b7c
The branch, stable-2.0 has been updated
via 15993bce1cd0a2e69f11a6ac1725fa7a219c5b7c (commit)
from cf9d4a82146556ff45d40d6eec8579082287900e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 15993bce1cd0a2e69f11a6ac1725fa7a219c5b7c
Author: Ian Price <address@hidden>
Date: Wed Apr 6 13:51:44 2011 +0100
fix assert to return true value.
* module/rnrs/base.scm (assert): returns value instead of void.
* test-suite/tests/r6rs-base.test ("assert"): add test cases.
-----------------------------------------------------------------------
Summary of changes:
module/rnrs/base.scm | 2 +-
test-suite/tests/r6rs-base.test | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/module/rnrs/base.scm b/module/rnrs/base.scm
index b867929..4cfd1d1 100644
--- a/module/rnrs/base.scm
+++ b/module/rnrs/base.scm
@@ -175,7 +175,7 @@
(define-syntax assert
(syntax-rules ()
((_ expression)
- (if (not expression)
+ (or expression
(raise (condition
(make-assertion-violation)
(make-message-condition
diff --git a/test-suite/tests/r6rs-base.test b/test-suite/tests/r6rs-base.test
index dfddf7c..df11d67 100644
--- a/test-suite/tests/r6rs-base.test
+++ b/test-suite/tests/r6rs-base.test
@@ -19,6 +19,8 @@
(define-module (test-suite test-r6rs-base)
:use-module ((rnrs base) :version (6))
+ :use-module ((rnrs conditions) :version (6))
+ :use-module ((rnrs exceptions) :version (6))
:use-module (test-suite lib))
@@ -188,3 +190,9 @@
(pass-if (not (integer-valued? +0.01i)))
(pass-if (not (integer-valued? -inf.0i))))
+(with-test-prefix "assert"
+ (pass-if "assert returns value" (= 1 (assert 1)))
+ (pass-if "assertion-violation"
+ (guard (condition ((assertion-violation? condition) #t))
+ (assert #f)
+ #f)))
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-178-g15993bc,
Andy Wingo <=