Changeset 38106 in project


Ignore:
Timestamp:
01/14/20 22:46:26 (8 days ago)
Author:
Kon Lovett
Message:

canon import style

Location:
release/5/fp-utils/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • release/5/fp-utils/trunk/fp-inlines.scm

    r36953 r38106  
    2020  fpprecision-factor)
    2121
    22 (import scheme
    23   (chicken type)
    24   (chicken flonum))
     22(import scheme)
     23(import (chicken type))
     24(import (chicken flonum))
    2525
    2626;;;(mathh/mathh-constants)
     
    8181(define (fpclosed-left? l x h) (and (fp<= l x) (fp< x h)))
    8282
     83;inline, remember
    8384(define (fpclosedr? l x h) (fpclosed-right? l x h))
    8485(define (fpclosedl? l x h) (fpclosed-left? l x h))
  • release/5/fp-utils/trunk/fp-utils.egg

    r36639 r38106  
    33
    44((synopsis "fp utilities")
    5  (version "4.1.0")
     5 (version "4.0.0")
    66 (category misc)
    77 (author "[[kon lovett]]")
  • release/5/fp-utils/trunk/fp-utils.scm

    r37874 r38106  
    2828  fp~= fp~<= fp~>=)
    2929
    30 (import scheme
    31   (chicken base)
    32   (chicken foreign)
    33   (chicken type)
    34   (chicken flonum)
    35   (chicken fixnum)
    36   fx-utils
    37   fp-inlines)
     30(import scheme)
     31(import (chicken base))
     32(import (chicken foreign))
     33(import (chicken type))
     34(import (chicken flonum))
     35(import (chicken fixnum))
     36(import fx-utils)
     37(import fp-inlines)
    3838
    3939;;;
  • release/5/fp-utils/trunk/tests/fp-utils-test.scm

    r36954 r38106  
    88;;;
    99
    10 (import (chicken base) (chicken flonum))
     10(import (chicken base))
     11(import  (chicken flonum))
    1112
    1213(import fp-inlines fp-utils)
  • release/5/fp-utils/trunk/tests/run.scm

    r36641 r38106  
     1;;;; run.scm -*- Scheme -*-
     2
     3(import scheme)
     4
     5;;; Create Time Const
    16
    27(define EGG-NAME "fp-utils")
     
    1015  (only (chicken format) format))
    1116
    12 (define *args* (argv))
     17(define (test-filename test-name)
     18  (string-append test-name "-test") )
    1319
    14 ;no -disable-interrupts
    15 (define *csc-options* "-inline-global \
    16   -specialize -optimize-leaf-routines -clustering -lfa2 \
    17   -local -inline \
    18   -no-trace -no-lambda-info \
    19   -unsafe")
    20 
    21 (define (test-name #!optional (eggnam EGG-NAME))
    22   (string-append eggnam "-test") )
    23 
    24 (define (egg-name #!optional (def EGG-NAME))
     20(define (egg-name args #!optional (def EGG-NAME))
    2521  (cond
    2622    ((<= 4 (length *args*))
     
    3127      (error 'test "cannot determine egg-name") ) ) )
    3228
    33 ;;;
     29;;
    3430
    35 (set! EGG-NAME (egg-name))
     31(define *args* (argv))
     32(define *egg* (egg-name *args*))
     33(define *tests* `(,*egg*))
    3634
    37 (define (run-test #!optional (eggnam EGG-NAME) (cscopts *csc-options*))
    38   (let ((tstnam (test-name eggnam)))
    39     (format #t "*** csi ***~%")
    40     (system (string-append "csi -s " (make-pathname #f tstnam "scm")))
    41     (newline)
    42     (format #t "*** csc ~s ***~%" cscopts)
    43     (system (string-append "csc" " " cscopts " " (make-pathname #f tstnam "scm")))
    44     (system (make-pathname (cond-expand (unix "./") (else #f)) tstnam)) ) )
     35(define *current-directory* (cond-expand (unix "./") (else #f)))
    4536
    46 (define (run-tests eggnams #!optional (cscopts *csc-options*))
    47   (for-each (cut run-test <> cscopts) eggnams) )
     37;no -disable-interrupts or -no-lambda-info
     38(define *csc-options* "-inline-global -local -inline \
     39  -specialize -optimize-leaf-routines -clustering -lfa2 \
     40  -no-trace -unsafe")
     41
     42(define (run-test-evaluated test-name test-source)
     43  (format #t "*** ~A - csi ***~%" test-name)
     44  (system (string-append "csi -s " test-source)) )
     45
     46(define (run-test-compiled test-name test-source csc-options)
     47  (format #t "*** ~A - csc ~A ***~%" test-name csc-options)
     48  ;csc output is in current directory
     49  (system (string-append "csc" " " csc-options " " test-source))
     50  (system (make-pathname *current-directory* (test-filename test-name))) )
    4851
    4952;;;
    5053
    51 (run-test)
     54(define (run-test #!optional (test-name *egg*) (csc-options *csc-options*))
     55  (let ((test-source (make-pathname #f (test-filename test-name) "scm")))
     56    (run-test-evaluated test-name test-source)
     57    (newline)
     58    (run-test-compiled test-name test-source csc-options) ) )
     59
     60(define (run-tests #!optional (test-names *tests*) (csc-options *csc-options*))
     61  (for-each (cut run-test <> csc-options) test-names) )
     62
     63;;; Do Test
     64
     65(run-tests)
Note: See TracChangeset for help on using the changeset viewer.