fix bug of compile ipc test cases failed

This commit is contained in:
liangshenglin1 2021-07-27 06:56:18 +00:00 committed by Gitee
parent 351646275c
commit 2af0fae6bc
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
#ifndef OHOS_IPC_TEST_SERVICE_COMMAND_H
#define OHOS_IPC_TEST_SERVICE_COMMAND_H
enum class TestCommand : int {
enum TestCommand {
TEST_CMD_NONE = 0,
TEST_CMD_SYNC_TRANS = 1,
TEST_CMD_ASYNC_TRANS = 2,

View File

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
int result = 0;
TestCommand commandId = TestCommand::TEST_CMD_SYNC_TRANS;
if (argc > 1) {
commandId = { atoi(argv[1]) };
commandId = TestCommand(atoi(argv[1]));
} else {
ZLOGE(LABEL, "unknown command");
}