Changeset 29245 in project


Ignore:
Timestamp:
06/26/13 13:21:59 (8 years ago)
Author:
juergen
Message:

dependency changed as well as docu-procedure

Location:
release/4/simple-tests
Files:
4 edited
3 copied

Legend:

Unmodified
Added
Removed
  • release/4/simple-tests/tags/1.2/simple-tests.meta

    r28286 r29245  
    44 (category testing)
    55 (license "BSD")
    6  (depends dbc expand-full)
     6 (depends multi-methods expand-full)
    77 (author "Juergen Lorenz")
    88 (files "simple-tests.setup" "simple-tests.release-info" "simple-tests.meta" "simple-tests.scm" "tests/run.scm"))
  • release/4/simple-tests/tags/1.2/simple-tests.scm

    r29233 r29245  
    3939;testing and debugging.
    4040
    41 (require-library dbc expand-full data-structures)
     41(require-library multi-methods expand-full data-structures)
    4242
    4343(module simple-tests (simple-tests xpr:val (run-tests simple-tests-run) pe pe*)
    4444
    4545(import scheme
    46   (only chicken eval-when expand unless)
     46  (only chicken eval-when expand)
     47  (only data-structures conjoin)
    4748  expand-full
    48   dbc
     49  methods
    4950  (only extras pp))
    50 (import-for-syntax (only chicken unless))
    51 
    52 (init-dbc)
    5351
    5452;The following macro, xpr:val, pretty-prints the literal representation
     
    6765       ...
    6866       ))))
    69 (push-contract!
    70   '(xpr:val
    71      (macro ()
    72        ((_ xpr . xprs)
    73         #t
    74         "prints each xpr and its value in interpreted code"))))
    7567
    7668;;; (run-tests xpr0 xpr1 ...)
     
    9183               (display n)
    9284               (display " test(s) failed!!!\n\n"))))))))
    93 (push-contract!
    94   '(run-tests
    95      (macro ()
    96        ((_ xpr . xprs)
    97         #t
    98         "runs each test expression, xpr, and prints success or failure"))))
    9985
    10086;;; The following commands compose pretty-print and expand or expand*
     
    10288;;; (pe macro-code)
    10389;;; ---------------
    104 (define-with-contract pe
    105   (command-contract ((old new (lambda (x) #t)))
    106     ((_ macro-code)
    107      #t
    108      "pretty-prints expanded macro-code"))
    109   (lambda (macro-code) (pp (expand macro-code))))
     90(define pe
     91  (method ('pe
     92           (lambda (macro-code) (pp (expand macro-code)))
     93           (no-checker "pretty-prints expanded macro-code"))
     94          ('1quoted-list? list?)))
    11095
    11196;;; (pe* macro-code)
    11297;;; ----------------
    113 (define-with-contract pe*
    114   (command-contract ((old new (lambda (x) #t)))
    115     ((_ macro-code)
    116      #t
    117      "pretty-prints fully expanded macro-code"))
    118   pretty-print-expand*)
     98(define pe*
     99  (method ('pe*
     100           pretty-print-expand*
     101           (no-checker "pretty-prints fully expanded macro-code"))
     102          ('1quoted-list? list?)))
    119103
     104;; only conditionally exported
    120105(define (simple-tests-run lst)
    121106  (let loop ((lst lst) (n 0))
     
    134119          (loop (cdr lst) (+ n 1)))))))
    135120
    136 ;;; save documentation in dispatcher
    137 (exit-dbc-with simple-tests)
     121(define (simple-tests)
     122  '(pe pe* run-tests xpr:val))
    138123
    139124) ; module simple-tests
  • release/4/simple-tests/tags/1.2/simple-tests.setup

    r29233 r29245  
    77 'simple-tests
    88 '("simple-tests.so" "simple-tests.import.so")
    9  '((version "1.1.1")))
     9 '((version "1.2")))
  • release/4/simple-tests/trunk/simple-tests.meta

    r28286 r29245  
    44 (category testing)
    55 (license "BSD")
    6  (depends dbc expand-full)
     6 (depends multi-methods expand-full)
    77 (author "Juergen Lorenz")
    88 (files "simple-tests.setup" "simple-tests.release-info" "simple-tests.meta" "simple-tests.scm" "tests/run.scm"))
  • release/4/simple-tests/trunk/simple-tests.scm

    r29233 r29245  
    3939;testing and debugging.
    4040
    41 (require-library dbc expand-full data-structures)
     41(require-library multi-methods expand-full data-structures)
    4242
    4343(module simple-tests (simple-tests xpr:val (run-tests simple-tests-run) pe pe*)
    4444
    4545(import scheme
    46   (only chicken eval-when expand unless)
     46  (only chicken eval-when expand)
     47  (only data-structures conjoin)
    4748  expand-full
    48   dbc
     49  methods
    4950  (only extras pp))
    50 (import-for-syntax (only chicken unless))
    51 
    52 (init-dbc)
    5351
    5452;The following macro, xpr:val, pretty-prints the literal representation
     
    6765       ...
    6866       ))))
    69 (push-contract!
    70   '(xpr:val
    71      (macro ()
    72        ((_ xpr . xprs)
    73         #t
    74         "prints each xpr and its value in interpreted code"))))
    7567
    7668;;; (run-tests xpr0 xpr1 ...)
     
    9183               (display n)
    9284               (display " test(s) failed!!!\n\n"))))))))
    93 (push-contract!
    94   '(run-tests
    95      (macro ()
    96        ((_ xpr . xprs)
    97         #t
    98         "runs each test expression, xpr, and prints success or failure"))))
    9985
    10086;;; The following commands compose pretty-print and expand or expand*
     
    10288;;; (pe macro-code)
    10389;;; ---------------
    104 (define-with-contract pe
    105   (command-contract ((old new (lambda (x) #t)))
    106     ((_ macro-code)
    107      #t
    108      "pretty-prints expanded macro-code"))
    109   (lambda (macro-code) (pp (expand macro-code))))
     90(define pe
     91  (method ('pe
     92           (lambda (macro-code) (pp (expand macro-code)))
     93           (no-checker "pretty-prints expanded macro-code"))
     94          ('1quoted-list? list?)))
    11095
    11196;;; (pe* macro-code)
    11297;;; ----------------
    113 (define-with-contract pe*
    114   (command-contract ((old new (lambda (x) #t)))
    115     ((_ macro-code)
    116      #t
    117      "pretty-prints fully expanded macro-code"))
    118   pretty-print-expand*)
     98(define pe*
     99  (method ('pe*
     100           pretty-print-expand*
     101           (no-checker "pretty-prints fully expanded macro-code"))
     102          ('1quoted-list? list?)))
    119103
     104;; only conditionally exported
    120105(define (simple-tests-run lst)
    121106  (let loop ((lst lst) (n 0))
     
    134119          (loop (cdr lst) (+ n 1)))))))
    135120
    136 ;;; save documentation in dispatcher
    137 (exit-dbc-with simple-tests)
     121(define (simple-tests)
     122  '(pe pe* run-tests xpr:val))
    138123
    139124) ; module simple-tests
  • release/4/simple-tests/trunk/simple-tests.setup

    r29233 r29245  
    77 'simple-tests
    88 '("simple-tests.so" "simple-tests.import.so")
    9  '((version "1.1.1")))
     9 '((version "1.2")))
Note: See TracChangeset for help on using the changeset viewer.