;;;;
;;;; test-box.stk   -- Tests on boxes
;;;;
;;;; Copyright © 2007-2020 Erick Gallesio - I3S-CNRS/ESSI <eg@essi.fr>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;;; GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;           Author: Erick Gallesio [eg@essi.fr]
;;;;    Creation date:  9-Dec-2007 21:02 (eg)
;;;;
(require "test")

(test-section "Boxes")


(test "make-box"
      "#&10"
      (with-output-to-string (lambda () (write (make-box 10)))))

(test "make-constant-box"
      "#&10"
      (with-output-to-string (lambda () (write (make-constant-box 10)))))

(test "reader"
      (make-box 100)
      (eval-from-string "#&100"))


(test "equal?.1"
      #f
      (equal? 100 (make-box 100)))

(test "equal?.2"
      #t
      (equal? #&100 (make-box 100)))



(test-section-end)
