未验证 提交 9ba3d186 编写于 作者: O openharmony_ci 提交者: Gitee

!5841 FIX:修改l1xts

Merge pull request !5841 from cheng_jinsong/1010_API
......@@ -18,6 +18,7 @@
#include "ohos_types.h"
#include "parameter.h"
#include "parameter_utils.h"
#include "sysparam_errno.h"
#define MAX_LEN 128
#define INVALID_LEN 2
......@@ -534,7 +535,7 @@ LITE_TEST_CASE(ParameterFuncTestSuite,
char key[] = "none.exist.key";
char value[MAX_LEN] = {0};
ret = GetParameter(key, NULL, value, MAX_LEN);
TEST_ASSERT_EQUAL_INT(-9, ret);
TEST_ASSERT_EQUAL_INT(SYSPARAM_NOT_FOUND, ret);
};
/**
......
......@@ -16,6 +16,7 @@
#include <cstdio>
#include "gtest/gtest.h"
#include "parameter.h"
#include "sysparam_errno.h"
using namespace std;
using namespace testing::ext;
......@@ -179,12 +180,12 @@ HWTEST_F(ParameterTest, SUB_START_Para_Setting_ilLegal_value_0010, Function | Me
char key1[] = "rw.sys.version.version";
char value1[] = "abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuv11";
ret = SetParameter(key1, value1);
EXPECT_EQ(ret, -9);
EXPECT_EQ(ret, SYSPARAM_INVALID_VALUE);
char key2[] = "rw.sys.version.version";
char value2[] = "abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuv222";
ret = SetParameter(key2, value2);
EXPECT_EQ(ret, -9);
EXPECT_EQ(ret, SYSPARAM_INVALID_VALUE);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册