提交 b7f2df03 编写于 作者: O openharmony_ci 提交者: Gitee

!334 fix: 修改tzset测试用例运行2遍现象

Merge pull request !334 from guweijie/master
......@@ -36,7 +36,7 @@
#include "lt_timer_test.h"
#include <stdlib.h>
static UINT32 testcase1(VOID)
static UINT32 testcase(VOID)
{
time_t td;
int ret = 0;
......@@ -58,11 +58,6 @@ OUT:
return LOS_NOK;
}
static UINT32 testcase(VOID)
{
testcase1();
}
void TIME_TEST_TZSET_001(void)
{
TEST_ADD_CASE(__FUNCTION__, testcase, TEST_POSIX, TEST_SWTMR, TEST_LEVEL0, TEST_FUNCTION);
......
......@@ -36,13 +36,13 @@
#include "lt_timer_test.h"
#include <stdlib.h>
static UINT32 testcase1(VOID)
static UINT32 testcase(VOID)
{
time_t td;
int ret = 0;
errno = 0;
ret = putenv("TZ=GMT-100");
ret = putenv((char *) "TZ=GMT-100");
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
tzset();
......@@ -58,11 +58,6 @@ OUT:
return LOS_NOK;
}
static UINT32 testcase(VOID)
{
testcase1();
}
void TIME_TEST_TZSET_002(void)
{
TEST_ADD_CASE(__FUNCTION__, testcase, TEST_POSIX, TEST_SWTMR, TEST_LEVEL0, TEST_FUNCTION);
......
......@@ -97,5 +97,27 @@ HWTEST_F(TimeTimerTest, TimerTest005, TestSize.Level0)
{
TimerTest005();
}
/* *
* @tc.name: TIME_TEST_TZSET_001
* @tc.desc: function for TIME_TEST_TZSET_001
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TimeTimerTest, TIME_TEST_TZSET_001, TestSize.Level0)
{
TIME_TEST_TZSET_001();
}
/* *
* @tc.name: TIME_TEST_TZSET_002
* @tc.desc: function for TimeTimerTest
* @tc.type: FUNC
* @tc.require: AR000EEMQ9
*/
HWTEST_F(TimeTimerTest, TIME_TEST_TZSET_002, TestSize.Level0)
{
TIME_TEST_TZSET_002();
}
#endif
} // namespace OHOS
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册