summaryrefslogtreecommitdiffstatsci
path: root/tests/context.c
blob: b22da8ab2b4729d5ae8f4450d688b511210996c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "test.h"

void create_destroy_multi(){
	VkvgContext* ctxs = (VkvgContext*)malloc(sizeof(VkvgContext)*test_size);
	for (uint32_t i = 0; i < test_size; i++)
		ctxs[i] = vkvg_create(surf);
	for (uint32_t i = 0; i < test_size; i++)
		vkvg_destroy(ctxs[i]);
	free(ctxs);
}

void create_destroy_single(){
	VkvgContext ctx = vkvg_create(surf);
	vkvg_destroy(ctx);
}

int main(int argc, char *argv[]) {
	PERFORM_TEST (create_destroy_multi, argc, argv);
	no_test_size = true;
	PERFORM_TEST (create_destroy_single, argc, argv);
	return 0;
}