zpp
Zephyr C++20 Framework
main.cpp File Reference
#include <zephyr/ztest.h>
#include <zpp/fmt.hpp>
Include dependency graph for main.cpp:

Go to the source code of this file.

Functions

 ZTEST_SUITE (zpp_print_tests, NULL, NULL, NULL, NULL, NULL)
 
 ZTEST (zpp_print_tests, test_print_uint8_t)
 
 ZTEST (zpp_print_tests, test_print_int8_t)
 
 ZTEST (zpp_print_tests, test_print_uint16_t)
 
 ZTEST (zpp_print_tests, test_print_int16_t)
 
 ZTEST (zpp_print_tests, test_print_uint32_t)
 
 ZTEST (zpp_print_tests, test_print_int32_t)
 
 ZTEST (zpp_print_tests, test_print_uint64_t)
 
 ZTEST (zpp_print_tests, test_print_int64_t)
 
 ZTEST (zpp_print_tests, test_print_char)
 
 ZTEST (zpp_print_tests, test_print_string)
 
 ZTEST (zpp_print_tests, test_print_void_ptr)
 

Function Documentation

◆ ZTEST() [1/11]

ZTEST ( zpp_print_tests  ,
test_print_char   
)

Definition at line 61 of file main.cpp.

62 {
63  char v{ 'c' };
64  zpp::print("char {} == c\n", v);
65 }
void print(const char *fmt, T_Args &&... args) noexcept
simple typesafe print function
Definition: fmt.hpp:157

References zpp::print().

◆ ZTEST() [2/11]

ZTEST ( zpp_print_tests  ,
test_print_int16_t   
)

Definition at line 31 of file main.cpp.

32 {
33  int16_t v{ -1234 };
34  zpp::print("int16_t {} == -1234\n", v);
35 }

References zpp::print().

◆ ZTEST() [3/11]

ZTEST ( zpp_print_tests  ,
test_print_int32_t   
)

Definition at line 43 of file main.cpp.

44 {
45  int32_t v{ -12345678 };
46  zpp::print("int32_t {} == -12345678\n", v);
47 }

References zpp::print().

◆ ZTEST() [4/11]

ZTEST ( zpp_print_tests  ,
test_print_int64_t   
)

Definition at line 55 of file main.cpp.

56 {
57  int64_t v{ -12345678901011 };
58  zpp::print("int64_t {} == -12345678901011\n", v);
59 }

References zpp::print().

◆ ZTEST() [5/11]

ZTEST ( zpp_print_tests  ,
test_print_int8_t   
)

Definition at line 19 of file main.cpp.

20 {
21  int8_t v{ -12 };
22  zpp::print("int8_t {} == -12\n", v);
23 }

References zpp::print().

◆ ZTEST() [6/11]

ZTEST ( zpp_print_tests  ,
test_print_string   
)

Definition at line 67 of file main.cpp.

68 {
69  const char* v{ "string" };
70  zpp::print("const char* {} == string\n", v);
71 }

References zpp::print().

◆ ZTEST() [7/11]

ZTEST ( zpp_print_tests  ,
test_print_uint16_t   
)

Definition at line 25 of file main.cpp.

26 {
27  uint16_t v{ 1234 };
28  zpp::print("uint16_t {} == 1234\n", v);
29 }

References zpp::print().

◆ ZTEST() [8/11]

ZTEST ( zpp_print_tests  ,
test_print_uint32_t   
)

Definition at line 37 of file main.cpp.

38 {
39  uint32_t v{ 12345678 };
40  zpp::print("uint32_t {} == 12345678\n", v);
41 }

References zpp::print().

◆ ZTEST() [9/11]

ZTEST ( zpp_print_tests  ,
test_print_uint64_t   
)

Definition at line 49 of file main.cpp.

50 {
51  uint64_t v{ 12345678901011 };
52  zpp::print("uint64_t {} == 12345678901011\n", v);
53 }

References zpp::print().

◆ ZTEST() [10/11]

ZTEST ( zpp_print_tests  ,
test_print_uint8_t   
)

Definition at line 13 of file main.cpp.

14 {
15  uint8_t v{ 12 };
16  zpp::print("uint8_t {} == 12\n", v);
17 }

References zpp::print().

◆ ZTEST() [11/11]

ZTEST ( zpp_print_tests  ,
test_print_void_ptr   
)

Definition at line 73 of file main.cpp.

74 {
75  void* v{ (void*)0x12345678 };
76  zpp::print("void* {} == 0x12345678\n", v);
77 }

References zpp::print().

◆ ZTEST_SUITE()

ZTEST_SUITE ( zpp_print_tests  ,
NULL  ,
NULL  ,
NULL  ,
NULL  ,
NULL   
)