Ignore:
Timestamp:
04/03/20 18:47:09 (16 months ago)
Author:
Kon Lovett
Message:

*-test runner, fix strict-types exposed test variable type rebinding, cannot use type predicates as "trait" predicates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/box/trunk/tests/box-test.scm

    r38415 r38529  
    1313
    1414(test-group "Box Mutable"
    15         (let ((tbox #f))
    16     (test-assert (make-box (void)))
    17     (set! tbox (make-box (void)))
     15        (let ((tbox (make-box (void))))
    1816    (test-assert (box? tbox))
    1917    (box-set! tbox #t)
     
    2321
    2422(test-group "Box Immutable"
    25         (let ((tbox #f))
    26     (test-assert (make-box #f #t))
    27     (set! tbox (make-box #f #t))
     23        (let ((tbox (make-box #f #t)))
    2824    (test-assert (box? tbox))
    2925    (test-assert (not (box-ref tbox)))
     
    3127)
    3228
     29(import (only (chicken memory representation) procedure-data))
     30
    3331(test-group "Box References"
    34         (let ((var (void))
    35         (tbox #f))
    36     (test-assert (make-box-variable var))
    37     (set! tbox (make-box-variable var))
     32        (let* ((var (void))
     33               (tbox (make-box-variable var)))
    3834    (test-assert (box? tbox))
    3935    (test-assert (box-variable? tbox))
     
    4743
    4844(test-group "Box Swap"
    49         (let ((tbox #f))
    50     (test-assert (make-box (void)))
    51     (set! tbox (make-box 0))
     45        (let ((tbox (make-box 0)))
    5246    (test-assert (box? tbox))
    5347    (test 1 (box-swap! tbox + 1))
     
    7670
    7771(test-group "Box"
    78         (let ((tbox #f))
    79     (test-assert (box (void)))
    80     (set! tbox (box (void)))
     72        (let ((tbox (box (void))))
    8173    (test-assert (box? tbox))
    8274    (box-set! tbox #t)
     
    8678
    8779(test-group "Immutable-Box"
    88         (let ((tbox #f))
    89     (test-assert (immutable-box #f))
    90     (set! tbox (immutable-box #f))
     80        (let ((tbox (immutable-box #f)))
    9181    (test-assert (box? tbox))
    9282    (test-assert (not (unbox tbox)))
Note: See TracChangeset for help on using the changeset viewer.