Skip to content

Commit 03f2a1c

Browse files
committed
rename test safety_locks custom build to mut_alias_locks + add FLECS_OS_API_IMPL define
1 parent 07227ec commit 03f2a1c

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

test/custom_builds/c/safety_locks/include/safety_locks.h renamed to test/custom_builds/c/mut_alias_locks/include/mut_alias_locks.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#ifndef SAFETY_LOCKS_H
2-
#define SAFETY_LOCKS_H
1+
#ifndef MUT_ALIAS_LOCKS_H
2+
#define MUT_ALIAS_LOCKS_H
33

44
/* This generated file contains includes for project dependencies */
5-
#include "safety_locks/bake_config.h"
5+
#include "mut_alias_locks/bake_config.h"
66

77
#ifdef __cplusplus
88
extern "C" {

test/custom_builds/c/safety_locks/include/safety_locks/bake_config.h renamed to test/custom_builds/c/mut_alias_locks/include/mut_alias_locks/bake_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* dependencies will automatically show up in this file. Include bake_config.h
1515
* in your main project file. Do not edit! */
1616

17-
#ifndef SAFETY_LOCKS_BAKE_CONFIG_H
18-
#define SAFETY_LOCKS_BAKE_CONFIG_H
17+
#ifndef MUT_ALIAS_LOCKS_BAKE_CONFIG_H
18+
#define MUT_ALIAS_LOCKS_BAKE_CONFIG_H
1919

2020
/* Headers of public dependencies */
2121
#include "../../deps/flecs.h"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "safety_locks",
2+
"id": "mut_alias_locks",
33
"type": "application",
44
"value": {
55
"public": false,
@@ -9,6 +9,6 @@
99
"standalone": true
1010
},
1111
"lang.c": {
12-
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_MUT_ALIAS_LOCKS"]
12+
"defines": ["FLECS_CUSTOM_BUILD", "FLECS_OS_API_IMPL","FLECS_MUT_ALIAS_LOCKS"]
1313
}
1414
}

test/custom_builds/c/safety_locks/src/main.c renamed to test/custom_builds/c/mut_alias_locks/src/main.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <safety_locks.h>
1+
#include <mut_alias_locks.h>
22
#include <stdio.h>
33
#include <assert.h>
44

@@ -262,7 +262,7 @@ void test_resizing(void) {
262262
//
263263

264264

265-
void test_table_component_safety_info(void) {
265+
void test_table_component_lock_target(void) {
266266
ecs_world_t *world = ecs_init();
267267

268268
ECS_COMPONENT(world, Position);
@@ -276,7 +276,7 @@ void test_table_component_safety_info(void) {
276276

277277
ecs_get_ptr_t result = flecs_record_get_id(world, e, r, ecs_id(Position));
278278
assert(result.ptr != NULL);
279-
279+
280280
// For table components: table should be set, cr should be NULL, column_index should be valid
281281
assert(result.lock_target.table != NULL);
282282
assert(result.lock_target.cr == NULL);
@@ -285,7 +285,7 @@ void test_table_component_safety_info(void) {
285285
ecs_fini(world);
286286
}
287287

288-
void test_sparse_fragmenting_safety_info(void) {
288+
void test_sparse_fragmenting_lock_target(void) {
289289
ecs_world_t *world = ecs_init();
290290

291291
ECS_COMPONENT(world, Position);
@@ -308,7 +308,7 @@ void test_sparse_fragmenting_safety_info(void) {
308308
ecs_fini(world);
309309
}
310310

311-
void test_sparse_non_fragmenting_safety_info(void) {
311+
void test_sparse_non_fragmenting_lock_target(void) {
312312
ecs_world_t *world = ecs_init();
313313

314314
ECS_COMPONENT(world, Position);
@@ -331,7 +331,7 @@ void test_sparse_non_fragmenting_safety_info(void) {
331331
ecs_fini(world);
332332
}
333333

334-
void test_get_vs_get_mut_safety_info(void) {
334+
void test_get_vs_get_mut_lock_target(void) {
335335
ecs_world_t *world = ecs_init();
336336

337337
ECS_COMPONENT(world, Position);
@@ -357,7 +357,7 @@ void test_get_vs_get_mut_safety_info(void) {
357357
ecs_fini(world);
358358
}
359359

360-
void test_null_component_safety_info(void) {
360+
void test_null_component_lock_target(void) {
361361
ecs_world_t *world = ecs_init();
362362

363363
ECS_COMPONENT(world, Position);
@@ -388,11 +388,11 @@ int main(int argc, char *argv[]) {
388388
test_multithreaded_with_conflicts();
389389
test_resizing();
390390

391-
test_table_component_safety_info();
392-
test_sparse_non_fragmenting_safety_info();
393-
test_sparse_fragmenting_safety_info();
394-
test_get_vs_get_mut_safety_info();
395-
test_null_component_safety_info();
391+
test_table_component_lock_target();
392+
test_sparse_non_fragmenting_lock_target();
393+
test_sparse_fragmenting_lock_target();
394+
test_get_vs_get_mut_lock_target();
395+
test_null_component_lock_target();
396396

397397
return 0;
398398
}

0 commit comments

Comments
 (0)