1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-14 09:40:20 +02:00

Add GOOPS `class-of' test for nameless structs.

* test-suite/tests/goops.test ("classes for built-in types")["struct
  vtable"]: New test case.
This commit is contained in:
Ludovic Courtès 2009-10-25 22:49:28 +01:00
parent f9e8030266
commit bb9c5bbd2e

View file

@ -140,7 +140,12 @@
(eq? (class-of "foo") <string>)) (eq? (class-of "foo") <string>))
(pass-if "port" (pass-if "port"
(is-a? (%make-void-port "w") <port>))) (is-a? (%make-void-port "w") <port>))
(pass-if "struct vtable"
;; Previously, `class-of' would fail for nameless structs, i.e., structs
;; for which `struct-vtable-name' is #f.
(is-a? (class-of (make-vtable-vtable "prprpr" 0)) <class>)))
(with-test-prefix "defining classes" (with-test-prefix "defining classes"