Author: yamakenz
Date: Mon Aug 6 15:13:29 2007
New Revision: 4802
Added:
sigscheme-trunk/test/panu-srfi69.scm
- copied, changed from r4801, /vendor/misc/test-hash.ss
Modified:
sigscheme-trunk/runtest.sh
sigscheme-trunk/test/Makefile.am
Log:
* test/panu-srfi69.scm
- New file copied from vendor/misc/test-hash.ss
- Adapted to SigScheme
* test/Makefile.am
- (imported_tests): Add panu-srfi69.scm as comment
* runtest.sh
- Add panu-srfi69.scm
Modified: sigscheme-trunk/runtest.sh
==============================================================================
--- sigscheme-trunk/runtest.sh (original)
+++ sigscheme-trunk/runtest.sh Mon Aug 6 15:13:29 2007
@@ -17,7 +17,7 @@
}
echo "[ Run single ported tests ]"
-for test in test/stone-srfi1.scm test/oleg-srfi2.scm #test/r5rs_pitfall.scm
+for test in test/stone-srfi1.scm test/oleg-srfi2.scm test/panu-srfi69.scm
#test/r5rs_pitfall.scm
do
run_test $test
done
Modified: sigscheme-trunk/test/Makefile.am
==============================================================================
--- sigscheme-trunk/test/Makefile.am (original)
+++ sigscheme-trunk/test/Makefile.am Mon Aug 6 15:13:29 2007
@@ -110,8 +110,9 @@
gauche-primsyn.scm \
oleg-srfi2.scm
-# Not included to the distribution since its original license is unknown.
+# Not included to the distribution since their original license is unknown.
#imported_tests += stone-srfi1.scm
+#imported_tests += panu-srfi69.scm
EXTRA_DIST += $(sscm_tests) $(imported_tests)
Copied: sigscheme-trunk/test/panu-srfi69.scm (from r4801,
/vendor/misc/test-hash.ss)
==============================================================================
--- /vendor/misc/test-hash.ss (original)
+++ sigscheme-trunk/test/panu-srfi69.scm Mon Aug 6 15:13:29 2007
@@ -1,7 +1,30 @@
+;; Written by Panu Kalliokoski. Although the license is expected as same as
+;; http://srfi.schemers.org/srfi-69/srfi-69.html, there is no license
+;; indication.
-(define-syntax assert
- (syntax-rules ()
- ((assert test) (if (not test) (error "failed assertion: " 'test)))))
+;; ChangeLog
+;;
+;; 2007-08-07 yamaken Imported from
+;;
http://members.sange.fi/~atehwa/vc/r+d/guse/srfi/test-hash.ss
+;; and adapted to SigScheme
+
+(load "./test/unittest.scm")
+
+(require-extension (srfi 38 69))
+
+(define tn test-name)
+
+(define assert-orig assert)
+(define assert
+ (lambda (test)
+ (let ((name (test-name)))
+ (assert-orig name name test))))
+
+;(define-syntax assert
+; (syntax-rules ()
+; ((assert test) (if (not test) (error "failed assertion: " 'test)))))
+
+(tn "SRFI-69")
(assert (not (hash-table? 'h)))
@@ -31,9 +54,13 @@
(assert (= 1 (hash-table-size h)))
(assert (not (hash-table-ref/default h 'foo #f)))
+;; SigScheme does not have non-integer numbers. -- YamaKen 2007-08-07
+;;(define example-data
+;; '(1 2 3 4 5 6 7 8 9 10 "a" "b" #\c #t 3/5 #f
+;; 5+3i (a b) et ot a b "maizen" #(t o e) x))
(define example-data
- '(1 2 3 4 5 6 7 8 9 10 "a" "b" #\c #t 3/5 #f
- 5+3i (a b) et ot a b "maizen" #(t o e) x))
+ '(1 2 3 4 5 6 7 8 9 10 "a" "b" #\c #t #f
+ (a b) et ot a b "maizen" #(t o e) x))
(for-each (lambda (v) (hash-table-set! h v v)) example-data)
(hash-table-delete! h "foo")
(assert (= (hash-table-size h) (length example-data)))
@@ -148,3 +175,4 @@
(assert (= 1369 (hash-table-ref h4c 37)))
+(total-report)