From 0d6971b560a5fdfcdf294ebe068c75f6318c24ad Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Sun, 16 Aug 2020 17:20:28 +0200 Subject: [PATCH] test/gc: struct. * src/test/gc.c (test_struct): New function. (main): Call it. --- src/test/gc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/gc.c b/src/test/gc.c index f7d5bf6d..9d00f46e 100644 --- a/src/test/gc.c +++ b/src/test/gc.c @@ -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; }