mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-14 01:30:19 +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:
parent
f9e8030266
commit
bb9c5bbd2e
1 changed files with 6 additions and 1 deletions
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue