mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
feat(newlib): add test case for printf float
This commit is contained in:
parent
e829cee2fd
commit
5e283e03b8
@ -230,3 +230,10 @@ TEST_CASE("newlib: rom and toolchain localtime func gives the same result", "[ne
|
||||
printf("%s\n", test_result);
|
||||
TEST_ASSERT_EQUAL_STRING("2020-03-12 15:00:00 EDT (tm_isdst = 1)", test_result);
|
||||
}
|
||||
|
||||
TEST_CASE("newlib: printf float as expected", "[newlib]")
|
||||
{
|
||||
const float val = 1.23;
|
||||
int len = printf("test printf float val is %1.2f\n", val);
|
||||
TEST_ASSERT_EQUAL_INT(30, len);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user