zpp
Zephyr C++20 Framework
main.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 Erwin Rol <erwin@erwinrol.com>
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 
7 #include <zephyr/ztest.h>
8 
9 #include <zephyr/kernel.h>
10 
11 #include <zpp/heap.hpp>
12 #include <zpp/fmt.hpp>
13 
14 
15 ZTEST_SUITE(zpp_heap_tests, NULL, NULL, NULL, NULL, NULL);
16 
17 namespace {
18 
19 zpp::heap<1024> g_heap;
20 
21 } // namespace
22 
23 ZTEST(zpp_heap_tests, test_heap)
24 {
25  auto p = g_heap.allocate(1);
26 
27  zassert_not_null(p, "");
28 
29  g_heap.deallocate(p);
30 
31  p = g_heap.allocate(128);
32 
33  zassert_not_null(p, "");
34 
35  g_heap.deallocate(p);
36 }
heap class
Definition: heap.hpp:159
ZTEST(zpp_atomic_tests, test_atomic_bitset)
Definition: main.cpp:23
ZTEST_SUITE(zpp_atomic_tests, NULL, NULL, NULL, NULL, NULL)