summaryrefslogtreecommitdiff
path: root/tests/pke-test-dummy.cpp
blob: efd1ff756a68c2d12277ee041ad617f2088aa4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

#include "./pke-test-dummy.h"

#include "asset-manager.hpp"
#include "camera.hpp"
#include "ecs.hpp"
#include "physics.hpp"
#include "pk.h"
#include "scene.hpp"
#include "static-ui.hpp"
#include "thread-pool.hpp"

int pke_test_dummy_001() {
	pk_ev_init(nullptr);
	Physics_Init();
	PkeThreads_Init();
	AM_Init();
	ECS_Init();
	pke_input_init();
	pke_ui_init();
	PkeCamera_Init();
	FontType_Init();
	pke_scene_master_init();
	/* do thing */
	/*
	{
		AssetHandle h = AM_GetHandle(AssetKey {"fnt_mquin_gly"});
		AM_Get(h);
		AM_Release(h);
	}
	*/
	pke_scene_master_teardown();
	FontType_Teardown();
	PkeCamera_Teardown();
	pke_ui_teardown();
	pke_input_teardown();
	ECS_Teardown();
	AM_Teardown();
	PkeThreads_Teardown();
	Physics_Teardown();
	pk_ev_teardown();
	return 0;
}

struct pke_test_group *pke_test_dummy_get_group() {
	static const uint64_t test_count = 2;
	static struct pke_test tests[test_count] = {
		{
			.title = "test 001",
			.func = pke_test_dummy_001,
			.expected_result = 0,
		},
		{
			.title = "test 002",
			.func = pke_test_dummy_001,
			.expected_result = 0,
		},
	};
	static struct pke_test_group group = {};
	group.title = "dummy test";
	group.n_tests = test_count;
	group.tests = &tests[0];

	return &group;
}