blob: 914f3cf92367570abcf2bc0b6ce5af9d41d5459d (
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
66
67
68
69
70
71
72
73
|
#include "./pke-test-dummy.h"
#include "asset-manager.hpp"
#include "camera.hpp"
#include "ecs.hpp"
#include "physics.hpp"
#include "pk.h"
#include "player-input.hpp"
#include "scene.hpp"
#include "static-ui.hpp"
#include "thread-pool.hpp"
static pk_membucket *bkt;
int pke_test_dummy_001() {
bkt = pk_mem_bucket_create("pke_test_dummy", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE);
pk_mem_bucket_set_client_mem_bucket(bkt);
pk_ev_init(bkt);
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();
pk_mem_bucket_destroy(bkt);
pk_mem_bucket_set_client_mem_bucket(nullptr);
bkt = nullptr;
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;
}
|