;; -*-theme-d-*-

;; Copyright (C) 2018  Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.

;; Expected results: translation and running OK

(define-proper-program (tests test675)

  (import (standard-library core)
	  (standard-library math)
	  (standard-library console-io)
	  (tests numerical-test-env))

  (define-simple-proc main (() <none> nonpure)
    (report-boolean-test (integer-valued? 1) #t)
    (report-boolean-test (integer-valued? (rational 2 2)) #t)
    (report-boolean-test (integer-valued? (rational 2 3)) #f)
    (report-boolean-test (integer-valued? 1.0) #t)
    (report-boolean-test (integer-valued? 1.5) #f)
    (report-boolean-test (integer-valued? (complex 1.0 0.0)) #t)
    (report-boolean-test (integer-valued? (complex 1.5 0.0)) #f)
    (report-boolean-test (integer-valued? (complex 1.0 2.0)) #f)
    (report-boolean-test (real-valued? 1) #t)
    (report-boolean-test (real-valued? (rational 2 2)) #t)
    (report-boolean-test (real-valued? (rational 2 3)) #t)
    (report-boolean-test (real-valued? 1.0) #t)
    (report-boolean-test (real-valued? 1.5) #t)
    (report-boolean-test (real-valued? (complex 1.0 0.0)) #t)
    (report-boolean-test (real-valued? (complex 1.5 0.0)) #t)
    (report-boolean-test (real-valued? (complex 1.0 2.0)) #f)
    (report-boolean-test (rational-valued? 1) #t)
    (report-boolean-test (rational-valued? (rational 2 2)) #t)
    (report-boolean-test (rational-valued? (rational 2 3)) #t)
    (report-boolean-test (rational-valued? 1.0) #t)
    (report-boolean-test (rational-valued? 1.5) #f)
    (report-boolean-test (rational-valued? (complex 1.0 0.0)) #t)
    (report-boolean-test (rational-valued? (complex 1.5 0.0)) #f)
    (report-boolean-test (rational-valued? (complex 1.0 2.0)) #f)))
