Changeset 38550 in project


Ignore:
Timestamp:
04/04/20 22:48:46 (2 months ago)
Author:
Kon Lovett
Message:

move srfi-111 into own test, forgot arfi-111 box?

Location:
release/5/box/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/box/trunk/box.egg

    r38548 r38550  
    33
    44((synopsis "Boxing")
    5  (version "3.2.1")
     5 (version "3.2.2")
    66 (category data)
    77 (license "BSD")
  • release/5/box/trunk/srfi-111.scm

    r38548 r38550  
    99(;export
    1010  box
    11   immutable-box
     11  box?
     12  unbox
    1213  set-box!
    13   unbox)
     14  immutable-box)
    1415
    1516(import scheme)
     
    4243      (box-set! ?box ?val) ) ) )
    4344
     45;;;
     46
    4447(register-feature! 'srfi-111)
    4548
  • release/5/box/trunk/tests/box-test.scm

    r38539 r38550  
    1111(import (chicken base))
    1212(import (only (chicken port) with-output-to-string))
     13(import (only (chicken memory representation) procedure-data))
    1314
    1415;;
     
    3031    (test-error (box-set! tbox #t)) )
    3132)
    32 
    33 (import (only (chicken memory representation) procedure-data))
    3433
    3534(test-group "Box References"
     
    5756;;;
    5857
    59 (test-begin "SRFI-111")
    60 
    61 (import (only (chicken platform) features))
    62 (import (srfi 111))
    63 
    64 (test-group "Feature"
    65   (test-assert "SRFI 111"
    66     (let loop ((rem (features)))
    67       (cond
    68         ((null? rem)
    69           #f )
    70         ((eq? #:srfi-111 (car rem))
    71           #t )
    72         (else
    73           (loop (cdr rem)) ) ) ) )
    74 )
    75 
    76 (test-group "Box"
    77         (let ((tbox (box (void))))
    78     (test-assert (box? tbox))
    79     (box-set! tbox #t)
    80     (test-assert (unbox tbox))
    81     (test-assert (not (box? 3))) )
    82 )
    83 
    84 (test-group "Immutable Box"
    85         (let ((tbox (immutable-box #f)))
    86     (test-assert (box? tbox))
    87     (test-assert (not (unbox tbox)))
    88     (test-error (box-set! tbox #t)) )
    89 )
    90 
    91 (test-end "SRFI-111")
    92 
    93 ;;;
    94 
    9558(test-end "Box")
    9659
Note: See TracChangeset for help on using the changeset viewer.