未验证 提交 23d2001e 编写于 作者: 于怀波 提交者: Gitee

update startup_lite/syspara_hal/src/deviceinfo_func_test.c.

Signed-off-by: N于怀波 <1015388983@qq.com>
上级 58449d7b
......@@ -427,15 +427,15 @@ LITE_TEST_CASE(DeviceInfoFuncTestSuite,
printf("Secure Patch Level=%s\n", value);
int year, month, day;
sscanf(value, "%04d-%02d-%02d", &year, &month, &day);
printf("%04d-%02d-%02d\n", year, month, day);
sscanf(value, "%04d\/%02d\/%02d", &year, &month, &day);
printf("%04d\/%02d\/%02d\n", year, month, day);
TEST_ASSERT_TRUE(year > 1900 && year < 2056);
TEST_ASSERT_TRUE(month <= 12 && month > 0);
TEST_ASSERT_TRUE(day <= 31 && day > 0);
char str[10] = {0};
sprintf(str, "%d-%02d-%02d", year, month, day);
sprintf(str, "%d\/%02d\/%02d", year, month, day);
printf("str=%s\n", str);
TEST_ASSERT_EQUAL_STRING(str, value);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册