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

Merge pull request !334 from guweijie/master
This commit is contained in:
openharmony_ci 2021-06-22 06:29:34 +00:00 committed by Gitee
commit b7f2df0350
3 changed files with 25 additions and 13 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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