1 /*
2 * Copyright (c) 2021, Commonwealth Scientific and Industrial Research
3 * Organisation (CSIRO) ABN 41 687 119 230.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8 #include <zephyr/ztest.h>
9 #include <zephyr/devicetree.h>
10 #include <zephyr/device.h>
11 #include <zephyr/drivers/gpio.h>
12
13 #include <zephyr/linker/devicetree_regions.h>
14
15 #define TEST_SRAM1 DT_NODELABEL(test_sram1)
16 #define TEST_SRAM2 DT_NODELABEL(test_sram2)
17
ZTEST(devicetree_api_ext,test_linker_regions)18 ZTEST(devicetree_api_ext, test_linker_regions)
19 {
20 zassert_true(!strcmp(LINKER_DT_NODE_REGION_NAME(TEST_SRAM1), "SRAM_REGION"), "");
21 zassert_true(!strcmp(LINKER_DT_NODE_REGION_NAME(TEST_SRAM2), "SRAM_REGION_2"), "");
22 }
23
24 ZTEST_SUITE(devicetree_api_ext, NULL, NULL, NULL, NULL, NULL);
25