1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
;; -*-theme-d-*-
;; Copyright (C) 2017 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.
;; Expected results: translation and running OK
;; Expected output: #t #f #f #t
(define-proper-program (tests test568)
(import (standard-library core)
(standard-library console-io))
(define-main-proc (() <none> nonpure)
(let* ((type1 (tuple-type-with-tail (:tuple <symbol> <symbol>)
(:uniform-list <integer>)))
(type2 (tuple-type-with-tail (:tuple <symbol> <symbol>)
<string>))
(x1 (list 'abc 'def 1 2 3))
(x2 '(xyz hik . "hello")))
(console-display-line (is-instance? x1 type1))
(console-display-line (is-instance? x1 type2))
(console-display-line (is-instance? x2 type1))
(console-display-line (is-instance? x2 type2)))))
|