chore: replace YES/NO macros to 1/0
Signed-off-by: Caoruihong <crh.cao@huawei.com> Change-Id: I40e31e82c33418019c1afc16ac174919e72fbb07
This commit is contained in:
@@ -64,7 +64,7 @@ typedef unsigned long iiUINT32;
|
||||
|
||||
#define TEST_MODE (FUNCTION_TEST)
|
||||
|
||||
#define TEST_LESSER_MEM NO
|
||||
#define TEST_LESSER_MEM 0
|
||||
|
||||
#define TEST_ADD_CASE(string, TestCase, TEST_POSIX, TEST_MEM, TEST_LEVEL0, TEST_FUNCTION) \
|
||||
do { \
|
||||
|
||||
@@ -99,16 +99,6 @@ typedef size_t BOOL;
|
||||
#define NULL ((VOID *)0)
|
||||
#endif
|
||||
|
||||
#ifdef YES
|
||||
#undef YES
|
||||
#endif
|
||||
#define YES 1
|
||||
|
||||
#ifdef NO
|
||||
#undef NO
|
||||
#endif
|
||||
#define NO 0
|
||||
|
||||
#define OS_NULL_BYTE ((UINT8)0xFF)
|
||||
#define OS_NULL_SHORT ((UINT16)0xFFFF)
|
||||
#define OS_NULL_INT ((UINT32)0xFFFFFFFF)
|
||||
|
||||
@@ -250,11 +250,11 @@ UINT32 LosTaskDelay(UINT32 tick);
|
||||
#define HUAWEI_ENV_NFS 0
|
||||
|
||||
#ifndef TEST_RESOURCELEAK_CHECK
|
||||
#define TEST_RESOURCELEAK_CHECK YES
|
||||
#define TEST_RESOURCELEAK_CHECK 1
|
||||
#endif
|
||||
|
||||
#ifndef TEST_MODULE_CHECK
|
||||
#define TEST_MODULE_CHECK YES
|
||||
#define TEST_MODULE_CHECK 1
|
||||
#endif
|
||||
|
||||
extern UINT32 g_shellTestQueueID;
|
||||
|
||||
@@ -77,7 +77,7 @@ UINT32 g_testCircleCount = 0;
|
||||
UINT32 g_fatFilesystem;
|
||||
UINT8 g_mUsIndex;
|
||||
|
||||
#if TEST_MODULE_CHECK == YES
|
||||
#if TEST_MODULE_CHECK == 1
|
||||
|
||||
extern UINT32 g_FailModelResult[];
|
||||
extern UINT32 g_PassModelResult[];
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "osTest.h"
|
||||
#include "sys/resource.h"
|
||||
|
||||
#define USE_TIMESTAMP YES
|
||||
#define USE_TIMESTAMP 1
|
||||
|
||||
extern void ItPosixLiteIpc001(void);
|
||||
extern void ItPosixLiteIpc002(void);
|
||||
|
||||
@@ -81,7 +81,7 @@ typedef struct {
|
||||
SvcIdentity target; /**< serviceHandle or targetTaskId, depending on type */
|
||||
uint32_t code;
|
||||
uint32_t flag;
|
||||
#if (USE_TIMESTAMP == YES)
|
||||
#if (USE_TIMESTAMP == 1)
|
||||
uint64_t timestamp;
|
||||
#endif
|
||||
uint32_t dataSz; /**< size of data */
|
||||
|
||||
@@ -71,7 +71,7 @@ void SendReply(int fd, IpcMsg *dataIn, uint32_t result, uint32_t serviceHandle)
|
||||
data1.outMsg->target.handle = dataIn->taskID;
|
||||
data1.outMsg->target.token = dataIn->target.token;
|
||||
data1.outMsg->code = dataIn->code;
|
||||
#if (USE_TIMESTAMP == YES)
|
||||
#if (USE_TIMESTAMP == 1)
|
||||
data1.outMsg->timestamp = dataIn->timestamp;
|
||||
#endif
|
||||
ptr[0] = result;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include "smgr_demo.h"
|
||||
|
||||
#define NEED_BREAK YES
|
||||
#define NEED_BREAK 1
|
||||
|
||||
static int g_ipcFd;
|
||||
char g_serviceName[] = "ohos.testservice";
|
||||
@@ -71,7 +71,7 @@ static int CallTestServiceLoop(uint32_t id)
|
||||
|
||||
while (1) {
|
||||
num++;
|
||||
#if (NEED_BREAK == YES)
|
||||
#if (NEED_BREAK == 1)
|
||||
if (num > 50000) {
|
||||
break;
|
||||
}
|
||||
@@ -148,7 +148,7 @@ static int TestServiceLoop(void)
|
||||
gettimeofday(&last_time, 0);
|
||||
while (1) {
|
||||
cnt++;
|
||||
#if (NEED_BREAK == YES)
|
||||
#if (NEED_BREAK == 1)
|
||||
if (cnt > 100000 - 10) {
|
||||
printf("TestServiceLoop break!\n");
|
||||
break;
|
||||
|
||||
@@ -1343,7 +1343,7 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue203, TestSize.Level0)
|
||||
ItPosixQueue203();
|
||||
}
|
||||
|
||||
#if (LOSCFG_USER_TEST_SMP == YES)
|
||||
#if (LOSCFG_USER_TEST_SMP == 1)
|
||||
/**
|
||||
* @tc.name: IT_POSIX_QUEUE_204
|
||||
* @tc.desc: function for PosixMqueueTest
|
||||
|
||||
Reference in New Issue
Block a user