-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: sprintf: convert normal test to use ztest
This patch convert net test cases to use ztest framework APIs which makes output unified to other test cases. Signed-off-by: Punit Vara <punit.vara@intel.com>
- Loading branch information
Showing
4 changed files
with
149 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ CONFIG_STDOUT_CONSOLE=y | |
CONFIG_NUM_IRQS=2 | ||
CONFIG_FLOAT=y | ||
CONFIG_MAIN_STACK_SIZE=2048 | ||
CONFIG_ZTEST=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
ccflags-y += -I${ZEPHYR_BASE}/tests/include | ||
include ${ZEPHYR_BASE}/tests/Makefile.test | ||
|
||
obj-y = test_sprintf.o | ||
obj-y = test_sprintf.o main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2017 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @addtogroup t_kernel_sprintf | ||
* @{ | ||
* @defgroup t_sprintf_api test_sorintf_fn | ||
* @} | ||
*/ | ||
|
||
#include <ztest.h> | ||
extern void sprintf_double_test(void); | ||
extern void vsnprintf_test(void); | ||
extern void vsprintf_test(void); | ||
extern void snprintf_test(void); | ||
extern void sprintf_misc_test(void); | ||
extern void sprintf_integer_test(void); | ||
extern void sprintf_stringtest(void); | ||
|
||
/*test case main entry*/ | ||
void test_main(void *p1, void *p2, void *p3) | ||
{ | ||
ztest_test_suite(test_sprintf_fn, | ||
ztest_unit_test(sprintf_double_test), | ||
ztest_unit_test(vsnprintf_test), | ||
ztest_unit_test(vsprintf_test), | ||
ztest_unit_test(snprintf_test), | ||
ztest_unit_test(sprintf_misc_test), | ||
ztest_unit_test(sprintf_integer_test), | ||
ztest_unit_test(sprintf_stringtest)); | ||
|
||
ztest_run_test_suite(test_sprintf_fn); | ||
} |
Oops, something went wrong.