test/gc: struct.

* src/test/gc.c (test_struct): New function.
(main): Call it.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2020-08-16 17:20:28 +02:00
parent b8a4869c3e
commit 0d6971b560
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -149,6 +149,19 @@ test_vector ()
test_gc ("vector");
}
void
test_struct ()
{
test_setup ();
SCM type = make_char ('t');
SCM printer = make_char ('p');
SCM fields = cons (make_char ('f'), cell_nil);
make_struct (type, fields, printer);
g_free = g_symbol_max + M2_CELL_SIZE;
test_gc ("struct");
}
int
main (int argc, char **argv, char **envp)
{
@ -175,6 +188,7 @@ main (int argc, char **argv, char **envp)
test_list ();
test_string ();
test_vector ();
test_struct ();
return 0;
}