Skip to content

Commit

Permalink
revive tests for PRINT/READ serialization option
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj committed Jul 16, 2013
1 parent 8fc40a6 commit d10e7ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
16 changes: 9 additions & 7 deletions lfarm-test/closure-test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,15 @@
(symbol-macrolet ((z (1+ x)))
(submit-task *channel* (lambda (y) (+ x y z)) 4)
(is (= 11 (receive-result *channel*)))))
(broadcast-task (lambda () (defclass stuff ()
((x :initarg :x)
(y :initarg :y)))))
(let ((stuff (make-instance 'stuff :x 3 :y 4)))
(with-slots (x y) stuff
(submit-task *channel* (lambda () (+ x y)))
(is (= 7 (receive-result *channel*))))))
#-lfarm.with-text-serializer
(progn
(broadcast-task (lambda () (defclass stuff ()
((x :initarg :x)
(y :initarg :y)))))
(let ((stuff (make-instance 'stuff :x 3 :y 4)))
(with-slots (x y) stuff
(submit-task *channel* (lambda () (+ x y)))
(is (= 7 (receive-result *channel*)))))))

(let ((x 3))
(deftask closure-add-3 (y)
Expand Down
1 change: 1 addition & 0 deletions lfarm-test/cognate-test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
(pmap 'vector (lambda (x) (* x x)) #(3 4 5 6))))
(is (equalp (map 'vector (lambda (x) (* x x)) '(3 4 5 6))
(pmap 'vector (lambda (x) (* x x)) '(3 4 5 6))))
#-lfarm.with-text-serializer
(let ((type '(simple-array fixnum (*))))
(is (equalp (map type (lambda (x) (* x x)) #(3 4 5 6))
(pmap type (lambda (x) (* x x)) #(3 4 5 6))))
Expand Down
2 changes: 1 addition & 1 deletion lfarm-test/promise-test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
(is (= 7 (force f)))
(is (eq :foo (nth-value 1 (force f))))))

#+lfarm.with-closures
#+(and lfarm.with-closures (not lfarm.with-text-serializer))
(remote-test future-closure-test
(let ((x 5)
(y 6))
Expand Down

0 comments on commit d10e7ef

Please sign in to comment.