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.

Ignore:
Timestamp:
2015-09-05T10:19:07-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r3470 r3479  
    9292    (is (equal (monom->list m) '(1 2 3)))))
    9393 
     94;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     95;;
     96;;        Order generics (LEX>, GRLEX>,...) tests
     97;;
     98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     99
     100
     101(def-fixture order-context ()
     102  (symbol-macrolet
     103      ((p (make-instance 'monom :exponents '(1 3 2)))
     104       (q (make-instance 'monom :exponents '(1 2 3))))
     105    (&body)))
     106
     107(test order
     108  "order"
     109  (with-fixture order-context ()
     110    (is-true (lex>  p q))
     111    (is-true (grlex>  p q))
     112    (is-true (revlex>  p q))
     113    (is-true (grevlex>  p q))
     114    (is-false (invlex>  p q))))
     115
     116(def-fixture elim-order-context ()
     117  (let* ((p (make-instance 'monom :exponents '(1 2 3)))
     118         (q (make-instance 'monom :exponents '(4 5 6)))
     119         (elim-order-factory (make-elimination-order-factory))
     120         (elim-order-1 (funcall elim-order-factory 1))
     121         (elim-order-2 (funcall elim-order-factory 2)))
     122    (&body)))
     123
     124
     125(test elim-order
     126  "Elimination order"
     127  (with-fixture elim-order-context ()
     128    (is-false (funcall elim-order-1 p q))
     129    (is-false (funcall elim-order-2 p q))))
     130
     131
    94132(run! 'monom-suite)
    95133(format t "All tests done!~%")
Note: See TracChangeset for help on using the changeset viewer.