未验证 提交 3c98b3f4 编写于 作者: O openharmony_ci 提交者: Gitee

!5357 【startup_lite】【3.1release】modify device info api test case.

Merge pull request !5357 from leiyuqian/startuplite0902
...@@ -16,6 +16,7 @@ import("//test/xts/tools/lite/build/suite_lite.gni") ...@@ -16,6 +16,7 @@ import("//test/xts/tools/lite/build/suite_lite.gni")
hctest_suite("ActsParameterTest") { hctest_suite("ActsParameterTest") {
suite_name = "acts" suite_name = "acts"
sources = [ sources = [
"src/deviceinfo_func_test.c",
"src/parameter_func_test.c", "src/parameter_func_test.c",
"src/parameter_reli_test.c", "src/parameter_reli_test.c",
"src/parameter_utils.c", "src/parameter_utils.c",
......
此差异已折叠。
...@@ -13,16 +13,17 @@ ...@@ -13,16 +13,17 @@
* limitations under the License. * limitations under the License.
*/ */
#include "ohos_types.h"
#include <securec.h> #include <securec.h>
#include "hctest.h" #include "hctest.h"
#include "ohos_types.h"
#include "parameter.h" #include "parameter.h"
#include "parameter_utils.h" #include "parameter_utils.h"
#define QUERY_TIMES 50 #define QUERY_TIMES 50
/** /**
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency * @tc.desc : register a test suite, this suite is used to test basic flow
* and interface dependency
* @param : subsystem name is utils * @param : subsystem name is utils
* @param : module name is parameter * @param : module name is parameter
* @param : test suit name is ParameterReliTestSuite * @param : test suit name is ParameterReliTestSuite
...@@ -53,12 +54,12 @@ static BOOL ParameterReliTestSuiteTearDown(void) ...@@ -53,12 +54,12 @@ static BOOL ParameterReliTestSuiteTearDown(void)
* @tc.name : Obtaining ProductType for multiple times * @tc.name : Obtaining ProductType for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli001,
Function | MediumTest | Level1) {
const char* value1 = GetDeviceType(); const char* value1 = GetDeviceType();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetDeviceType(); const char* value = GetDeviceType();
} }
const char* value2 = GetDeviceType(); const char* value2 = GetDeviceType();
...@@ -70,12 +71,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi ...@@ -70,12 +71,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli001, Function | Medi
* @tc.name : Obtaining Manufacture for multiple times * @tc.name : Obtaining Manufacture for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli002,
Function | MediumTest | Level1) {
const char* value1 = GetManufacture(); const char* value1 = GetManufacture();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetManufacture(); const char* value = GetManufacture();
} }
const char* value2 = GetManufacture(); const char* value2 = GetManufacture();
...@@ -87,12 +88,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi ...@@ -87,12 +88,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli002, Function | Medi
* @tc.name : Obtaining Brand for multiple times * @tc.name : Obtaining Brand for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli003,
Function | MediumTest | Level1) {
const char* value1 = GetBrand(); const char* value1 = GetBrand();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBrand(); const char* value = GetBrand();
} }
const char* value2 = GetBrand(); const char* value2 = GetBrand();
...@@ -104,12 +105,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi ...@@ -104,12 +105,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli003, Function | Medi
* @tc.name : Obtaining MarketName for multiple times * @tc.name : Obtaining MarketName for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli004,
Function | MediumTest | Level1) {
const char* value1 = GetMarketName(); const char* value1 = GetMarketName();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetMarketName(); const char* value = GetMarketName();
} }
const char* value2 = GetMarketName(); const char* value2 = GetMarketName();
...@@ -121,12 +122,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi ...@@ -121,12 +122,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli004, Function | Medi
* @tc.name : Obtaining ProductSeries for multiple times * @tc.name : Obtaining ProductSeries for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli005,
Function | MediumTest | Level1) {
const char* value1 = GetProductSeries(); const char* value1 = GetProductSeries();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetProductSeries(); const char* value = GetProductSeries();
} }
const char* value2 = GetProductSeries(); const char* value2 = GetProductSeries();
...@@ -138,12 +139,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi ...@@ -138,12 +139,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli005, Function | Medi
* @tc.name : Obtaining ProductModel for multiple times * @tc.name : Obtaining ProductModel for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli006,
Function | MediumTest | Level1) {
const char* value1 = GetProductModel(); const char* value1 = GetProductModel();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetProductModel(); const char* value = GetProductModel();
} }
const char* value2 = GetProductModel(); const char* value2 = GetProductModel();
...@@ -155,12 +156,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi ...@@ -155,12 +156,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli006, Function | Medi
* @tc.name : Obtaining HardwareModel for multiple times * @tc.name : Obtaining HardwareModel for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli007,
Function | MediumTest | Level1) {
const char* value1 = GetHardwareModel(); const char* value1 = GetHardwareModel();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetHardwareModel(); const char* value = GetHardwareModel();
} }
const char* value2 = GetHardwareModel(); const char* value2 = GetHardwareModel();
...@@ -172,12 +173,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi ...@@ -172,12 +173,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli007, Function | Medi
* @tc.name : Obtaining HardwareProfile for multiple times * @tc.name : Obtaining HardwareProfile for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli008,
Function | MediumTest | Level1) {
const char* value1 = GetHardwareProfile(); const char* value1 = GetHardwareProfile();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetHardwareProfile(); const char* value = GetHardwareProfile();
} }
const char* value2 = GetHardwareProfile(); const char* value2 = GetHardwareProfile();
...@@ -189,15 +190,15 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | Medi ...@@ -189,15 +190,15 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli008, Function | Medi
* @tc.name : Obtaining Serial for multiple times * @tc.name : Obtaining Serial for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli009,
Function | MediumTest | Level1) {
const char* value1 = GetSerial(); const char* value1 = GetSerial();
if (value1 == NULL) { if (value1 == NULL) {
printf("The serial number needs to be written\n"); printf("The serial number needs to be written\n");
TEST_IGNORE(); TEST_IGNORE();
} }
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetSerial(); const char* value = GetSerial();
} }
const char* value2 = GetSerial(); const char* value2 = GetSerial();
...@@ -209,12 +210,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi ...@@ -209,12 +210,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli009, Function | Medi
* @tc.name : Obtaining OsName for multiple times * @tc.name : Obtaining OsName for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli010,
Function | MediumTest | Level1) {
const char* value1 = GetOSFullName(); const char* value1 = GetOSFullName();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetOSFullName(); const char* value = GetOSFullName();
} }
const char* value2 = GetOSFullName(); const char* value2 = GetOSFullName();
...@@ -226,12 +227,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi ...@@ -226,12 +227,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli010, Function | Medi
* @tc.name : Obtaining DisplayVersion for multiple times * @tc.name : Obtaining DisplayVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli011,
Function | MediumTest | Level1) {
const char* value1 = GetDisplayVersion(); const char* value1 = GetDisplayVersion();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetDisplayVersion(); const char* value = GetDisplayVersion();
} }
const char* value2 = GetDisplayVersion(); const char* value2 = GetDisplayVersion();
...@@ -243,12 +244,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi ...@@ -243,12 +244,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli011, Function | Medi
* @tc.name : Obtaining BootloaderVersion for multiple times * @tc.name : Obtaining BootloaderVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli012,
Function | MediumTest | Level1) {
const char* value1 = GetBootloaderVersion(); const char* value1 = GetBootloaderVersion();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBootloaderVersion(); const char* value = GetBootloaderVersion();
} }
const char* value2 = GetBootloaderVersion(); const char* value2 = GetBootloaderVersion();
...@@ -260,12 +261,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi ...@@ -260,12 +261,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli012, Function | Medi
* @tc.name : Obtaining SecurityPatchTag for multiple times * @tc.name : Obtaining SecurityPatchTag for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli013,
Function | MediumTest | Level1) {
const char* value1 = GetSecurityPatchTag(); const char* value1 = GetSecurityPatchTag();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetSecurityPatchTag(); const char* value = GetSecurityPatchTag();
} }
const char* value2 = GetSecurityPatchTag(); const char* value2 = GetSecurityPatchTag();
...@@ -277,12 +278,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi ...@@ -277,12 +278,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli013, Function | Medi
* @tc.name : Obtaining AbiList for multiple times * @tc.name : Obtaining AbiList for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli014,
Function | MediumTest | Level1) {
const char* value1 = GetAbiList(); const char* value1 = GetAbiList();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetAbiList(); const char* value = GetAbiList();
} }
const char* value2 = GetAbiList(); const char* value2 = GetAbiList();
...@@ -294,13 +295,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | Medi ...@@ -294,13 +295,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli014, Function | Medi
* @tc.name : Obtaining FirstApiLevel for multiple times * @tc.name : Obtaining FirstApiLevel for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli015,
Function | MediumTest | Level1) {
int value1 = GetFirstApiVersion(); int value1 = GetFirstApiVersion();
TEST_ASSERT_NOT_NULL(value1); TEST_ASSERT_NOT_NULL(value1);
TEST_ASSERT_TRUE((int)value1 == value1); TEST_ASSERT_TRUE((int)value1 == value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
int value = GetFirstApiVersion(); int value = GetFirstApiVersion();
} }
int value2 = GetFirstApiVersion(); int value2 = GetFirstApiVersion();
...@@ -312,12 +313,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi ...@@ -312,12 +313,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli015, Function | Medi
* @tc.name : Obtaining IncrementalVersion for multiple times * @tc.name : Obtaining IncrementalVersion for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli016,
Function | MediumTest | Level1) {
const char* value1 = GetIncrementalVersion(); const char* value1 = GetIncrementalVersion();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetIncrementalVersion(); const char* value = GetIncrementalVersion();
} }
const char* value2 = GetIncrementalVersion(); const char* value2 = GetIncrementalVersion();
...@@ -329,12 +330,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi ...@@ -329,12 +330,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli016, Function | Medi
* @tc.name : Obtaining VersionId for multiple times * @tc.name : Obtaining VersionId for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli017,
Function | MediumTest | Level1) {
const char* value1 = GetVersionId(); const char* value1 = GetVersionId();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetVersionId(); const char* value = GetVersionId();
} }
const char* value2 = GetVersionId(); const char* value2 = GetVersionId();
...@@ -346,12 +347,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi ...@@ -346,12 +347,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli017, Function | Medi
* @tc.name : Obtaining BuildType for multiple times * @tc.name : Obtaining BuildType for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli018,
Function | MediumTest | Level1) {
const char* value1 = GetBuildType(); const char* value1 = GetBuildType();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBuildType(); const char* value = GetBuildType();
} }
const char* value2 = GetBuildType(); const char* value2 = GetBuildType();
...@@ -363,12 +364,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi ...@@ -363,12 +364,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli018, Function | Medi
* @tc.name : Obtaining BuildUser for multiple times * @tc.name : Obtaining BuildUser for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli019,
Function | MediumTest | Level1) {
const char* value1 = GetBuildUser(); const char* value1 = GetBuildUser();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBuildUser(); const char* value = GetBuildUser();
} }
const char* value2 = GetBuildUser(); const char* value2 = GetBuildUser();
...@@ -380,12 +381,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi ...@@ -380,12 +381,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli019, Function | Medi
* @tc.name : Obtaining BuildHost for multiple times * @tc.name : Obtaining BuildHost for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli020,
Function | MediumTest | Level1) {
const char* value1 = GetBuildHost(); const char* value1 = GetBuildHost();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBuildHost(); const char* value = GetBuildHost();
} }
const char* value2 = GetBuildHost(); const char* value2 = GetBuildHost();
...@@ -397,12 +398,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi ...@@ -397,12 +398,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli020, Function | Medi
* @tc.name : Obtaining BuildTime for multiple times * @tc.name : Obtaining BuildTime for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli021,
Function | MediumTest | Level1) {
const char* value1 = GetBuildTime(); const char* value1 = GetBuildTime();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBuildTime(); const char* value = GetBuildTime();
} }
const char* value2 = GetBuildTime(); const char* value2 = GetBuildTime();
...@@ -414,12 +415,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi ...@@ -414,12 +415,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli021, Function | Medi
* @tc.name : Obtaining BuildRootHash for multiple times * @tc.name : Obtaining BuildRootHash for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli022,
Function | MediumTest | Level1) {
const char* value1 = GetBuildRootHash(); const char* value1 = GetBuildRootHash();
TEST_ASSERT_NOT_NULL(value1); TEST_ASSERT_NOT_NULL(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetBuildRootHash(); const char* value = GetBuildRootHash();
} }
const char* value2 = GetBuildRootHash(); const char* value2 = GetBuildRootHash();
...@@ -431,12 +432,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi ...@@ -431,12 +432,12 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli022, Function | Medi
* @tc.name : Obtaining SoftwareModel for multiple times * @tc.name : Obtaining SoftwareModel for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli023,
Function | MediumTest | Level1) {
const char* value1 = GetSoftwareModel(); const char* value1 = GetSoftwareModel();
AssertNotEmpty(value1); AssertNotEmpty(value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
const char* value = GetSoftwareModel(); const char* value = GetSoftwareModel();
} }
const char* value2 = GetSoftwareModel(); const char* value2 = GetSoftwareModel();
...@@ -448,13 +449,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | Medi ...@@ -448,13 +449,13 @@ LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli023, Function | Medi
* @tc.name : Obtaining SdkApiLevel for multiple times * @tc.name : Obtaining SdkApiLevel for multiple times
* @tc.desc : [C- SOFTWARE -0200] * @tc.desc : [C- SOFTWARE -0200]
*/ */
LITE_TEST_CASE(ParameterReliTestSuite, testObtainSysParaReli024, Function | MediumTest | Level1) LITE_TEST_CASE(ParameterReliTestSuite,
{ testObtainSysParaReli024,
Function | MediumTest | Level1) {
int value1 = GetSdkApiVersion(); int value1 = GetSdkApiVersion();
TEST_ASSERT_NOT_NULL(value1); TEST_ASSERT_NOT_NULL(value1);
TEST_ASSERT_TRUE((int)value1 == value1); TEST_ASSERT_TRUE((int)value1 == value1);
for (int i = 0; i < QUERY_TIMES; i++) for (int i = 0; i < QUERY_TIMES; i++) {
{
int value = GetSdkApiVersion(); int value = GetSdkApiVersion();
} }
int value2 = GetSdkApiVersion(); int value2 = GetSdkApiVersion();
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
#include "hctest.h"
#include "parameter_utils.h" #include "parameter_utils.h"
#include "hctest.h"
void AssertNotEmpty(const char* sysPara) void AssertNotEmpty(const char* sysPara)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册