Changeset 4167
- Timestamp:
- 2016-06-03T01:46:31-07:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/5am-monom.lisp
r4094 r4167 213 213 (is (universal-equalp (left-contract term 1) term-contracted)))) 214 214 215 (test sexp-conversion 216 "Sexp conversion" 217 (is (equal (->sexp (make-instance 'term :exponents '(0 0 0 0) :coeff -5) '(x y u v)) -5)) 218 (signals (error "Variables NIL and exponents #(0 0 0 0) must have the same length.") 219 (->sexp (make-instance 'monom :exponents '(0 0 0 0)))) 220 (is (equal (->sexp (make-instance 'monom :exponents '(0 0 0 0)) '(x y u w)) 1)) 221 (is (equal (->sexp (make-instance 'monom :exponents '(0 0 1 0)) '(x y u w)) 'u)) 222 (is (equalp (->sexp (make-instance 'monom :exponents '(1 2 1 1)) '(x y u w)) 223 '(* X (EXPT Y 2) U W))) 224 (is (equal (->sexp (make-instance 'term :exponents '(0 1 0 0) :coeff -5) '(x y u v)) 225 '(* -5 Y))) 226 (is (equal (->sexp (make-instance 'term :exponents '(1 1 0 0) :coeff -5) '(x y u v)) 227 '(* -5 X Y))) 228 (is (equal (->sexp (make-instance 'term :exponents '(1 0 0 0) :coeff -5) '(x y u v)) 229 '(* -5 X))) 230 (is (equal (->sexp (make-instance 'term :exponents '(11 0 0 0) :coeff -5) '(x y u v)) 231 '(* -5 (EXPT X 11)))) 232 (is (equal (->sexp (make-instance 'term :exponents '(11 0 0 0) :coeff 5) '(x y u v)) 233 '(* 5 (EXPT X 11)))) 234 (is (equal (->sexp (make-instance 'term :exponents '(11 0 4 0) :coeff 5) '(x y u v)) 235 '(* 5 (EXPT X 11) (EXPT U 4)))) 236 ) 237 215 238 (run! 'monom-suite) 216 239 (format t "All tests done!~%")
Note:
See TracChangeset
for help on using the changeset viewer.