Skip to content

Commit

Permalink
[utest] fix utest cases failure because of missing dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterywolf committed Jan 12, 2025
1 parent 3b6b4ca commit eefae9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/utest/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ src = []
if GetDepend('RT_UTEST_USING_ALL_CASES') or GetDepend('RTDUINO_USING_UTEST'):
src += Glob('TC_*.c')
src += Glob('TC_*.cpp')
if GetDepend('RTDUINO_UTEST_USING_HIL'):
if not GetDepend('RTDUINO_UTEST_USING_HIL'):
SrcRemove(src, Glob('TC_HIL_*.c'))
SrcRemove(src, Glob('TC_HIL_*.cpp'))

Expand Down
6 changes: 4 additions & 2 deletions core/utest/TC_dtostrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,14 @@ TC_dtostrf_entry(width)
/* Utest function to run all test cases */
static void utest_do_tc(void)
{
#ifdef RT_KLIBC_USING_VSNPRINTF_STANDARD
TC_dtostrf_run(basic);
TC_dtostrf_run(round);
TC_dtostrf_run(width);
// TC_dtostrf_run(big);
// TC_dtostrf_run(minmax);
// TC_dtostrf_run(nans);
TC_dtostrf_run(round);
TC_dtostrf_run(width);
#endif /* RT_KLIBC_USING_VSNPRINTF_STANDARD */
}

UTEST_TC_EXPORT(utest_do_tc, "RTduino.core.dtostrf", RT_NULL, RT_NULL, 1000);
2 changes: 2 additions & 0 deletions core/utest/TC_dtostrnf.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ static void TC_dtostrnf(void)
/* Utest function to run all test cases */
static void utest_do_tc(void)
{
#ifdef RT_KLIBC_USING_VSNPRINTF_STANDARD
UTEST_UNIT_RUN(TC_dtostrf);
UTEST_UNIT_RUN(TC_dtostrnf);
#endif /* RT_KLIBC_USING_VSNPRINTF_STANDARD */
}

UTEST_TC_EXPORT(utest_do_tc, "RTduino.core.dtostrnf", RT_NULL, RT_NULL, 1000);

0 comments on commit eefae9b

Please sign in to comment.