Coops record-variant test added by Kooda on Tue Apr 23 12:24:24 2019

(test-begin "print-object method")

(define-class <foo> ())
(define ofoo (make <foo>))

(define-method (print-object (obj <foo>) port)
  (display "OK" port))

(test "direct call" "OK" (with-output-to-string (lambda () (print-object ofoo (current-output-port)))))
(test "via record printer" "OK" (with-output-to-string (lambda () (display ofoo))))

(test-end)