;; -*-theme-d-*-

;; Copyright (C) 2017-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
;; Expected output: #t #t #t #t #f #f #f #f #t #t #t #t #f #f #f #f
;;   #t #t #t #t #f #f #f #f #t


(define-proper-program (tests test567)


  (import (standard-library core)
	  (standard-library list-utilities)
	  (standard-library console-io))

  (define-class <my-class1> <object> #t #f #f public ()
    ((i <integer> public module)))

  (define-class <my-class2> <object> #f #f #f public ()
    ((i <integer> public module)))

  (define main
    (lambda (() <none> nonpure)
      (let* ((l1 '(abc def ghi))
	     (l2 '(1 3 4 6 5))
	     (x1 (make <my-class1> 10))
	     (x2 (make <my-class1> 10))
	     (x3 (make <my-class2> 100))
	     (x4 (make <my-class2> 100))
	     (x5 (make <my-class2> 200))
	     (x6 (make <my-class2> 100))
	     (l3 (list x1 x2))
	     (l4 (list x3 x4)))
	(console-display-line (member? 'def l1))
	(console-display-line (member-values? 'def l1))
	(console-display-line (member-objects? 'def l1))
	(console-display-line (member-contents? 'def l1))
	(console-display-line (member? 'jkl l1))
	(console-display-line (member-values? 'jkl l1))
	(console-display-line (member-objects? 'jkl l1))
	(console-display-line (member-contents? 'jkl l1))
	(console-display-line (member? 4 l2))
	(console-display-line (member-values? 4 l2))
	(console-display-line (member-objects? 4 l2))
	(console-display-line (member-contents? 4 l2))
	(console-display-line (member? 10 l2))
	(console-display-line (member-values? 10 l2))
	(console-display-line (member-objects? 10 l2))
	(console-display-line (member-contents? 10 l2))
	(console-display-line (member? x2 l3))
	(console-display-line (member-values? x2 l3))
	(console-display-line (member-objects? x2 l3))
	(console-display-line (member-contents? x2 l3))
	(console-display-line (member? x5 l4))
	(console-display-line (member-values? x5 l4))
	(console-display-line (member-objects? x5 l4))
	(console-display-line (member-contents? x5 l4))
	(console-display-line (member-contents? x6 l4))))))
