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

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.h:17
#define MOS_TEST_CURRENT_TEST_SKIPPED
static char buffer[2048]
Definition test_printf.c:7

Definition at line 14 of file test_printf.c.

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.c.

◆ MOS_TEST_CASE() [2/7]

MOS_TEST_CASE ( simple_string )

Definition at line 42 of file test_printf.c.

◆ MOS_TEST_CASE() [3/7]

MOS_TEST_CASE ( integer_no_precision )

Definition at line 50 of file test_printf.c.

◆ MOS_TEST_CASE() [4/7]

MOS_TEST_CASE ( integer_with_precision )

Definition at line 109 of file test_printf.c.

◆ MOS_TEST_CASE() [5/7]

MOS_TEST_CASE ( integer_left_justified )

Definition at line 256 of file test_printf.c.

◆ MOS_TEST_CASE() [6/7]

MOS_TEST_CASE ( integer_extreme_case )

Definition at line 375 of file test_printf.c.

◆ MOS_TEST_CASE() [7/7]

MOS_WARNING_PUSH MOS_TEST_CASE ( printf_tests_github )

Definition at line 389 of file test_printf.c.

Variable Documentation

◆ buffer