Skip to content

Commit f68fbb1

Browse files
committed
fixup! tests/unittests: add registry_string_path tests
Migrate to local test namespace
1 parent d9a7f68 commit f68fbb1

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
include $(RIOTBASE)/Makefile.base
1+
DIRS += namespace
2+
3+
include $(RIOTBASE)/Makefile.base
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
USEMODULE += registry_string_path
2-
USEMODULE += registry_namespace_tests_nested
2+
3+
USEMODULE += tests-registry-namespace
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../tests-registry/namespace

tests/unittests/tests-registry_string_path/tests-registry_string_path.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
#include "mtd.h"
3535
#include "registry.h"
3636
#include "registry/string_path.h"
37-
#include "registry/namespace/tests.h"
38-
#include "registry/namespace/tests/nested.h"
37+
#include "namespace/tests.h"
38+
#include "namespace/tests/nested.h"
3939

40-
#if IS_USED(MODULE_REGISTRY_NAMESPACE_TESTS_NESTED) || IS_ACTIVE(DOXYGEN)
40+
#if IS_ACTIVE(CONFIG_REGISTRY_ENABLE_META_NAME) || IS_ACTIVE(DOXYGEN)
4141

4242
static registry_tests_nested_instance_t test_instance_data = {
4343
.parameter = 9,
@@ -147,6 +147,7 @@ static void tests_registry_from_parameter_string_path(void)
147147
registry_node_t node;
148148

149149
const char *str[] = { "tests", "nested", "instance-1", "group", "parameter" };
150+
150151
registry_node_from_string_path(str, ARRAY_SIZE(str), &node);
151152

152153
TEST_ASSERT_EQUAL_INT(REGISTRY_NODE_PARAMETER, node.type);
@@ -161,6 +162,7 @@ static void tests_registry_from_group_string_path(void)
161162
registry_node_t node;
162163

163164
const char *str[] = { "tests", "nested", "instance-1", "group" };
165+
164166
registry_node_from_string_path(str, ARRAY_SIZE(str), &node);
165167

166168
TEST_ASSERT_EQUAL_INT(REGISTRY_NODE_GROUP, node.type);
@@ -175,6 +177,7 @@ static void tests_registry_from_instance_string_path(void)
175177
registry_node_t node;
176178

177179
const char *str[] = { "tests", "nested", "instance-1" };
180+
178181
registry_node_from_string_path(str, ARRAY_SIZE(str), &node);
179182

180183
TEST_ASSERT_EQUAL_INT(REGISTRY_NODE_INSTANCE, node.type);
@@ -188,6 +191,7 @@ static void tests_registry_from_schema_string_path(void)
188191
registry_node_t node;
189192

190193
const char *str[] = { "tests", "nested" };
194+
191195
registry_node_from_string_path(str, ARRAY_SIZE(str), &node);
192196

193197
TEST_ASSERT_EQUAL_INT(REGISTRY_NODE_SCHEMA, node.type);
@@ -200,6 +204,7 @@ static void tests_registry_from_namespace_string_path(void)
200204
registry_node_t node;
201205

202206
const char *str[] = { "tests" };
207+
203208
registry_node_from_string_path(str, ARRAY_SIZE(str), &node);
204209

205210
TEST_ASSERT_EQUAL_INT(REGISTRY_NODE_NAMESPACE, node.type);

0 commit comments

Comments
 (0)