Serene Runtime 1.0.0
C runtime for the Serene programming language
Loading...
Searching...
No Matches
gc_tests.h File Reference
#include <serene/gc/gc.h>
#include <serene/rt/context.h>
#include "base.h"
Include dependency graph for gc_tests.h:

Go to the source code of this file.

Data Structures

struct  gc_dummy
 

Macros

#define GC_TESTS(X)
 

Typedefs

typedef struct gc_dummy gc_dummy
 

Functions

static void test_gc_allocation ()
 

Macro Definition Documentation

◆ GC_TESTS

#define GC_TESTS ( X)
Value:
X("gc::allocation", test_gc_allocation)
static void test_gc_allocation()
Definition gc_tests.h:33

Definition at line 26 of file gc_tests.h.

Typedef Documentation

◆ gc_dummy

typedef struct gc_dummy gc_dummy

Function Documentation

◆ test_gc_allocation()

static void test_gc_allocation ( )
static

Definition at line 33 of file gc_tests.h.

33 {
34 MAKE_CONTEXT(ctx);
35
36 gc_dummy *d = (gc_dummy *)ctx->gc->alloc(sizeof(gc_dummy));
37 TEST_CHECK(d != nullptr);
38 srn_shutdown_context(ctx);
39}
#define TEST_CHECK(cond)
Definition acutest.h:96
#define MAKE_CONTEXT(engine, x)
Definition base.h:42