!334 fix: 修改tzset测试用例运行2遍现象
Merge pull request !334 from guweijie/master
This commit is contained in:
commit
b7f2df0350
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue