Commits

Shlomi Fish committed f480bc6

Add *=.

Comments (0)

Files changed (2)

lurking-lisp-library/lurking.lisp

 (defmacro -= (x y)
   `(incf ,x (- ,y)))
+(defmacro *= (x y)
+  `(setf ,x (* ,x ,y)))

lurking-lisp-library/t/op-equal-sign.lisp

 
 (let ((producer (make-instance 'tap-producer)))
   (init-test producer)
-  (emit-plan producer :plan-argument 1) ; simple plan, three tests planned
-  ; TEST
+  (emit-plan producer :plan-argument 2) ; simple plan, three tests planned
   (let ((result 28))
     (-= result 4)
-    (emit-result producer :success (= result 24) :description "Test -="))
+    ; TEST
+    (emit-result producer :success (= result 24) :description "Test -=")
+    (*= result 2)
+    ; TEST
+    (emit-result producer :success (= result 48) :description "Test *="))
   (finalize-test producer))