MOS Source Code
Loading...
Searching...
No Matches
test_printf.cpp File Reference
#include "test_engine_impl.h"
#include <mos_stdio.hpp>
+ Include dependency graph for test_printf.cpp:

Go to the source code of this file.

Macros

#define PRINTF_TEST(expected, format, ...)
 

Functions

 MOS_TEST_DEFINE_CONDITION (printf_tests_enable_posix, "POSIX exts")
 
 MOS_TEST_DEFINE_CONDITION (printf_tests_enable_floats, "floating points")
 
 MOS_TEST_DEFINE_CONDITION (printf_tests_enable_egp, "e, g, p tests")
 
 MOS_TEST_DEFINE_CONDITION (printf_tests_enable_oxX, "o, x, X tests")
 
 MOS_TEST_CASE (percent_sign)
 
 MOS_TEST_CASE (simple_string)
 
 MOS_TEST_CASE (integer_no_precision)
 
 MOS_TEST_CASE (integer_with_precision)
 
 MOS_TEST_CASE (integer_left_justified)
 
 MOS_TEST_CASE (integer_extreme_case)
 
MOS_WARNING_PUSH MOS_TEST_CASE (printf_tests_github)
 

Variables

static char buffer [2048] = { 0 }
 

Macro Definition Documentation

◆ PRINTF_TEST

#define PRINTF_TEST ( expected,
format,
... )
Value:
do \
{ \
{ \
MOS_TEST_SKIP(); \
break; \
} \
sprintf(buffer, format __VA_OPT__(, ) __VA_ARGS__); \
MOS_TEST_CHECK_STRING(buffer, expected); \
} while (0)
MOSAPI const char *__restrict format
Definition mos_stdio.hpp:17
#define MOS_TEST_CURRENT_TEST_SKIPPED
static char buffer[2048]

Definition at line 14 of file test_printf.cpp.

Referenced by MOS_TEST_CASE(), MOS_TEST_CASE(), MOS_TEST_CASE(), MOS_TEST_CASE(), MOS_TEST_CASE(), MOS_TEST_CASE(), and MOS_TEST_CASE().

Function Documentation

◆ MOS_TEST_DEFINE_CONDITION() [1/4]

MOS_TEST_DEFINE_CONDITION ( printf_tests_enable_posix ,
"POSIX exts"  )

◆ MOS_TEST_DEFINE_CONDITION() [2/4]

MOS_TEST_DEFINE_CONDITION ( printf_tests_enable_floats ,
"floating points"  )

◆ MOS_TEST_DEFINE_CONDITION() [3/4]

MOS_TEST_DEFINE_CONDITION ( printf_tests_enable_egp ,
" e,
g ,
p tests"  )

◆ MOS_TEST_DEFINE_CONDITION() [4/4]

MOS_TEST_DEFINE_CONDITION ( printf_tests_enable_oxX ,
" o,
x ,
X tests"  )

◆ MOS_TEST_CASE() [1/7]

MOS_TEST_CASE ( percent_sign )

Definition at line 26 of file test_printf.cpp.

◆ MOS_TEST_CASE() [2/7]

MOS_TEST_CASE ( simple_string )

Definition at line 42 of file test_printf.cpp.

◆ MOS_TEST_CASE() [3/7]

MOS_TEST_CASE ( integer_no_precision )

Definition at line 50 of file test_printf.cpp.

◆ MOS_TEST_CASE() [4/7]

MOS_TEST_CASE ( integer_with_precision )

Definition at line 109 of file test_printf.cpp.

◆ MOS_TEST_CASE() [5/7]

MOS_TEST_CASE ( integer_left_justified )

Definition at line 256 of file test_printf.cpp.

◆ MOS_TEST_CASE() [6/7]

MOS_TEST_CASE ( integer_extreme_case )

Definition at line 375 of file test_printf.cpp.

◆ MOS_TEST_CASE() [7/7]

MOS_WARNING_PUSH MOS_TEST_CASE ( printf_tests_github )

Definition at line 389 of file test_printf.cpp.

Variable Documentation

◆ buffer

char buffer[2048] = { 0 }
static

Definition at line 7 of file test_printf.cpp.

Referenced by basic_string< char, mos::default_allocator >::_convert_to_short(), basic_string< char, mos::default_allocator >::_init(), _null_read(), _null_write(), app_main(), basic_string< char, mos::default_allocator >::basic_string(), basic_string< char, mos::default_allocator >::basic_string(), cpio_i_readlink(), decode_callback_field(), dmabuf_share(), dmabuf_unshare(), do_callback_decode(), do_decode(), do_roundtrip(), do_stream_decode(), flakystream_init(), generate_base_message(), impl_syscall_io_read(), impl_syscall_io_write(), impl_syscall_vfs_list_dir(), ipc_msg_create(), ipc_msg_destroy(), ipc_read_as_msg(), ipc_read_msg(), ipc_write_msg(), main(), main(), main(), MOS_STATIC_ASSERT(), basic_string< char, mos::default_allocator >::operator=(), pb_encode_string(), pb_encode_varint_32(), print_string(), rand_protobuf_noise(), ring_buffer_destroy(), ring_buffer_is_empty(), ring_buffer_is_full(), ring_buffer_pop_back(), ring_buffer_pop_back_byte(), ring_buffer_pop_front(), ring_buffer_pop_front_byte(), ring_buffer_pos_pop_back_byte(), ring_buffer_pos_pop_front_byte(), ring_buffer_pos_push_back_byte(), ring_buffer_pos_push_front_byte(), ring_buffer_push_back(), ring_buffer_push_back_byte(), ring_buffer_push_front(), ring_buffer_push_front_byte(), ring_buffer_resize(), rpc_write_result_pb(), run_iteration(), SerialConsole::SerialConsole(), SubMsg3_callback(), syscall_io_read(), syscall_io_write(), syscall_vfs_list_dir(), sysfs_expand_buffer(), test_Garbage(), test_OneofMessage(), test_TestMessage(), tmpfs_i_readlink(), and userfs_iop_readlink().