diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-07 15:31:00 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-07 20:29:14 +0100 |
commit | f7716ac1a87649cad96242f2d5bf0a987d7f430c (patch) | |
tree | b4b84951ef468fd644c42e9e0fee535d879f0387 /tests/test/srfi-41-util.scm | |
parent | Cleanup in (hnh util path). (diff) | |
download | calp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.gz calp-f7716ac1a87649cad96242f2d5bf0a987d7f430c.tar.xz |
Add new tests.
Diffstat (limited to '')
-rw-r--r-- | tests/test/srfi-41-util.scm (renamed from tests/srfi-41-util.scm) | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/srfi-41-util.scm b/tests/test/srfi-41-util.scm index 3c2c3f0f..176fb38e 100644 --- a/tests/srfi-41-util.scm +++ b/tests/test/srfi-41-util.scm @@ -3,27 +3,29 @@ ;; Currently only tests stream-paginate. ;;; Code: -(((srfi srfi-41 util) stream-paginate) - ((srfi srfi-41) stream->list stream-ref stream-from - stream-filter stream-car stream) - ((ice-9 sandbox) call-with-time-limit) - ) +(define-module (test srfi-41-util) + :use-module (srfi srfi-64) + :use-module (srfi srfi-88) + :use-module ((srfi srfi-41 util) :select (stream-paginate)) + :use-module ((srfi srfi-41) + :select (stream->list + stream-ref + stream-from + stream-filter + stream-car + stream)) + :use-module ((ice-9 sandbox) :select (call-with-time-limit))) (test-equal "Finite stream" '((0 1 2) (3 4 5) (6 7 8) (9)) - (let ((strm - (stream-paginate (stream 0 1 2 3 4 5 6 7 8 9) - 3))) + (let ((strm (stream-paginate (stream 0 1 2 3 4 5 6 7 8 9) 3))) (map stream->list (stream->list strm)))) - (test-equal "slice of infinite" - '(1000 1001 1002 1003 1004 1005 1006 1007 1008 1009) + '(1000 1001 1002 1003 1004 1005 1006 1007 1008 1009) (let ((strm (stream-paginate (stream-from 0)))) (stream->list (stream-ref strm 100)))) - - (define unique-symbol (gensym)) (test-equal "time out on infinite 'empty' stream" @@ -38,3 +40,5 @@ 0.1 (lambda () (stream-car strm)) (lambda _ unique-symbol)))) + + |