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:
2016-06-10T09:50:24-07:00 (8 years ago)
Author:
Marek Rychlik
Message:
 
File:
1 edited

Legend:

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

    r4411 r4434  
    6565  (is (equal (infix-print-to-string '(+ x (- y z))) "X+Y-Z"))
    6666  (is (equal (infix-print-to-string '(+ x (- y))) "X-Y"))
     67  (is (equal (infix-print-to-string '(- x (- y))) "X+Y"))
     68  (is (equal (infix-print-to-string '(- x (- y z))) "X-Y+Z"))
    6769  ;; Distinguich between unary and binary division
    6870  (is (equal (infix-print-to-string '(* x (/ y z))) "X*Y/Z"))
    6971  (is (equal (infix-print-to-string '(* x (/ y))) "X/Y"))
     72  ;; Handling negative numbers
     73  (is (equal (infix-print-to-string '(+ x -1 2 -3)) "X-1+2-3"))
     74  (is (equal (infix-print-to-string '(- x (- y 7))) "X-Y+7"))
     75  )
    7076
    71   )
    7277
    7378(run! 'infix-printer-suite)
Note: See TracChangeset for help on using the changeset viewer.