Changeset 14559 in project


Ignore:
Timestamp:
05/07/09 18:24:46 (10 years ago)
Author:
sjamaan
Message:

Add a note about why we're using eval, and use it everywhere.

Being tired & having a beer is not the optimal state for coding...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/s48-modules/tests/run.scm

    r14535 r14559  
    99  (define b1 2))
    1010
     11;; We're using EVAL everywhere because we want to have the TEST form
     12;; trap all errors, including those raised at macro expansion time.
    1113(test "import s48 module"
    1214      3
    13       (begin (define-structure s48-exports
    14                (export c1)
    15                (open scheme)
    16                (begin (define c1 3)
    17                       (define d1 4)))
     15      (eval '(begin (define-structure s48-exports
     16                      (export c1)
     17                      (open scheme)
     18                      (begin (define c1 3)
     19                             (define d1 4)))
    1820             
    19              (import s48-exports)
     21                    (import s48-exports)
    2022             
    21              c1))
     23                    c1)))
    2224
    2325(test-error "non-exported symbols not accessible"
     
    2628(test "importing from chicken modules"
    2729      11
    28       (begin
    29         (define-structure s48-import-from-chicken
    30           (export e1)
    31           (open scheme chicken-exports)
    32           (begin (define e1 (+ a1 10))))
     30      (eval '(begin
     31               (define-structure s48-import-from-chicken
     32                 (export e1)
     33                 (open scheme chicken-exports)
     34                 (begin (define e1 (+ a1 10))))
    3335       
    34         (import s48-import-from-chicken)
     36               (import s48-import-from-chicken)
    3537       
    36         e1))
     38               e1)))
    3739
    3840(test-error "error on undefined variable (ignore warning)"
    39             ;; Why do we need eval here?  Makes no sense
    4041            (eval '(define-structure missing-chicken-import
    4142                     (export g1)
     
    4445
    4546(test-error "error when not importing core scheme (ignore warning)"
    46             ;; Why do we need eval here?  Makes no sense
    4747            (eval '(define-structure missing-scheme-import
    4848                     (export h1)
     
    5151(test "prefixed import"
    5252      101
    53       (begin
    54         (define-structure prefixed-import
    55           (export i1)
    56           (open scheme (with-prefix chicken-exports p:))
    57           (begin (define i1 (+ p:a1 100))))
    58         (import prefixed-import)
    59         i1))
     53      (eval '(begin
     54               (define-structure prefixed-import
     55                 (export i1)
     56                 (open scheme (with-prefix chicken-exports p:))
     57                 (begin (define i1 (+ p:a1 100))))
     58               (import prefixed-import)
     59               i1)))
Note: See TracChangeset for help on using the changeset viewer.