close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 2639 for branches/f4grobner


Ignore:
Timestamp:
2015-06-20T14:45:49-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/5am-monom.lisp

    r2630 r2639  
    170170    (is-false (funcall elim-order-2 p q))))
    171171
    172 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    173 ;;
    174 ;;        POLY class tests
    175 ;;
    176 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    177 
    178 (def-fixture poly-context ()
    179   (let ((p (make-instance 'poly))
    180         (q (make-instance 'poly :order #'grlex>)))
    181     (dolist (x '( (2 . 22)  (4 . 44) (5 . 55)    ))
    182       (insert-item p (make-instance 'term :exponents (list (car x)) :coeff (cdr x))))
    183     (dolist (x '( (0 . 11)  (3 . 33) (4 . -44)  (7 . 77) ))
    184       (insert-item q (make-instance 'term :exponents (list (car x)) :coeff (cdr x))))
    185     (&body)))
    186 
    187 
    188 (test poly-add
    189   "Polynomial addition"
    190   (with-fixture poly-context ()
    191     (print p)(print q)
    192     (print (add-to p q))
    193     (print p)(print q)
    194   ))
    195 
    196 (test poly-subtract
    197   "Polynomial subtraction"
    198   (with-fixture poly-context ()
    199     (print p)(print q)
    200     (print (subtract-from p q))
    201     (print p)(print q)
    202   ))
    203 
    204172(run! 'monom-suite)
    205173(format t "All tests done!~%")
Note: See TracChangeset for help on using the changeset viewer.