diff --git a/dub.json b/dub.json index ba935ee..4eca570 100755 --- a/dub.json +++ b/dub.json @@ -1,5 +1,5 @@ { - "name": "ecs", + "name": "bubel_ecs", "authors": [ "MichaƂ Masiukiewicz", "Dawid Masiukiewicz" ], diff --git a/meson.build b/meson.build index 2a71fc7..4951584 100644 --- a/meson.build +++ b/meson.build @@ -67,6 +67,8 @@ ecs_lib = library('ecs', src, include_directories : [tests_inc, inc], d_args: ar executable('tests', tests_src, include_directories : [tests_inc, inc], d_args: args, link_args: link_args, link_with: ecs_lib) +bubel_ecs_dep = declare_dependency(include_directories : [inc], link_with : ecs_lib) + if BuildDemos_opt subdir('demos/utils') subdir('demos') diff --git a/tests/basic.d b/tests/basic.d index 4a9dc6f..bcea918 100644 --- a/tests/basic.d +++ b/tests/basic.d @@ -158,6 +158,7 @@ unittest unittest { EntityTemplate* tmpl_ = gEM.allocateTemplate([CInt.component_id, CFloat.component_id, CFlag.component_id].staticArray); + scope(exit)gEM.freeTemplate(tmpl_); assert(tmpl_.info.components.length == 3); assert(tmpl_.info.size == (CInt.sizeof + CFloat.sizeof + EntityID.sizeof)); assert(tmpl_.getComponent!CInt); @@ -346,6 +347,7 @@ unittest assert(*tmpl_7.getComponent!CLong == 10); gEM.freeTemplate(tmpl_d); + gEM.freeTemplate(tmpl_cp); gEM.freeTemplate(tmpl_); gEM.freeTemplate(tmpl_2); gEM.freeTemplate(tmpl_3); @@ -369,6 +371,8 @@ unittest assert(*tmpl_.getComponent!CInt == 1); assert(*tmpl_.getComponent!CFloat == 2.0); assert(tmpl_.info == tmpl_2.info); + gEM.freeTemplate(tmpl_); + gEM.freeTemplate(tmpl_2); } @("MultiRegister") diff --git a/tests/tests.d b/tests/tests.d index 9f69987..d539f89 100644 --- a/tests/tests.d +++ b/tests/tests.d @@ -1014,6 +1014,7 @@ else: writeEntityComponents(gEM.getEntity(entity)); //import std.stdio; ////writeln((cast(uint*)tmpl.info.first_block)[0..48]); + gEM.freeTemplate(tmpl_empty); gEM.freeTemplate(tmpl); gEM.freeTemplate(tmpl2); gEM.freeTemplate(copy_tempalte);