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 3271


Ignore:
Timestamp:
2015-06-22T21:22:50-07:00 (10 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r3267 r3271  
    5757(in-suite symbolic-poly-suite)
    5858
     59(def-fixture sym-poly-context ()
     60  (let ((p (make-instance 'poly))
     61        (p-symbolic (make-instance 'symbolic-poly :vars '(x))))
     62    (dolist (x '( ((2) . 22)  ((4) . 44) ((5) . 55) ((8) . 88) ((9) . 99) ))
     63      (insert-item p (make-instance 'term :exponents (car x) :coeff (cdr x)))
     64      (insert-item p-symbolic (make-instance 'term :exponents (car x) :coeff (cdr x))))
     65    (&body)))
     66
    5967(test sym-poly
    60   (let ((p (make-instance 'poly))
    61         (q (make-instance 'poly :order nil))
    62         (p+q (make-instance 'poly))
    63         (p-q (make-instance 'poly))
    64         (p-uminus (make-instance 'poly)))
    65     ;; Populate the polynomials; the lists of (exponents . coefficient) pairs
    66     ;; must be in increasing order in Q, but Q is unordered (:ORDER NIL)
    67     ;; so it will be automatically sorted.
    68     (dolist (x '( ((2) . 22)  ((4) . 44) ((5) . 55) ((8) . 88) ((9) . 99) ))
    69       (insert-item p (make-instance 'term :exponents (car x) :coeff (cdr x))))
     68  "Symbolic polynomial"
     69  (with-fixture sym-poly-context ()
     70    (is-true (r-equalp (change-class p 'symbolic-poly :vars '(x)) p-symbolic ))))
    7071
    7172
Note: See TracChangeset for help on using the changeset viewer.