[uim-commit] r2087 - in branches/r5rs/sigscheme: . test
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 8 08:50:50 PST 2005
Author: yamaken
Date: 2005-11-08 08:50:46 -0800 (Tue, 08 Nov 2005)
New Revision: 2087
Modified:
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/test/test-srfi34-2.scm
branches/r5rs/sigscheme/test/test-srfi34.scm
branches/r5rs/sigscheme/test/unittest.scm
Log:
* sigscheme/sigscheme.c
- (SigScm_Initialize_internal): Provide "sigscheme"
* sigscheme/test/unittest.scm
- (cond-expand) New alias
- (sigscheme): New variable
- Prepare SRFI-34 in portable between SigScheme and Gauche
- (undef): New procedure
* sigscheme/test/test-srfi34.scm
- Prepare SRFI-34 in portable between SigScheme and Gauche
* sigscheme/test/test-srfi34-2.scm
- Ditto
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-11-08 15:38:19 UTC (rev 2086)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-11-08 16:50:46 UTC (rev 2087)
@@ -377,6 +377,8 @@
#if SCM_EXCEPTION_HANDLING
ScmExp_use(Scm_Intern("srfi-34"), SCM_INTERACTION_ENV);
#endif
+ /* to evaluate SigScheme-dependent codes conditionally */
+ ScmOp_provide(Scm_NewStringCopying("sigscheme"));
}
void SigScm_Finalize()
Modified: branches/r5rs/sigscheme/test/test-srfi34-2.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-srfi34-2.scm 2005-11-08 15:38:19 UTC (rev 2086)
+++ branches/r5rs/sigscheme/test/test-srfi34-2.scm 2005-11-08 16:50:46 UTC (rev 2087)
@@ -32,7 +32,10 @@
(load "./test/unittest.scm")
-(use srfi-34)
+(cond-expand
+ (sigscheme
+ (use srfi-34))
+ (else #t))
;; these tests are ported from "Examples" section of SRFI-34
Modified: branches/r5rs/sigscheme/test/test-srfi34.scm
===================================================================
--- branches/r5rs/sigscheme/test/test-srfi34.scm 2005-11-08 15:38:19 UTC (rev 2086)
+++ branches/r5rs/sigscheme/test/test-srfi34.scm 2005-11-08 16:50:46 UTC (rev 2087)
@@ -32,7 +32,10 @@
(load "./test/unittest.scm")
-(use srfi-34)
+(cond-expand
+ (sigscheme
+ (use srfi-34))
+ (else #t))
;; with-exception-handler
Modified: branches/r5rs/sigscheme/test/unittest.scm
===================================================================
--- branches/r5rs/sigscheme/test/unittest.scm 2005-11-08 15:38:19 UTC (rev 2086)
+++ branches/r5rs/sigscheme/test/unittest.scm 2005-11-08 16:50:46 UTC (rev 2087)
@@ -30,8 +30,16 @@
;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-(use srfi-34)
+(if (provided? "sigscheme")
+ (begin
+ (define cond-expand cond)
+ (define sigscheme #t)))
+(cond-expand
+ (sigscheme
+ (use srfi-34))
+ (else #t))
+
(define *total-testsuites* 1) ;; TODO: introduce test suites and defaults to 0
(define *total-testcases* 1) ;; TODO: introduce testcase and defaults to 0
(define *total-tests* 1) ;; TODO: introduce test group and defaults to 0
@@ -120,5 +128,10 @@
;; misc
;;
+;; SigScheme and Gauche surely returns #<undef>
+(define undef
+ (lambda ()
+ (for-each values ())))
+
(define (eval-counter n)
(list 'eval-counter (+ n 1)))
More information about the uim-commit
mailing list