Skip to content

Commit

Permalink
Merge pull request #1008 from xunzhu0507/boatiotsdk_2_0-dev
Browse files Browse the repository at this point in the history
PR: add BoatIotSdkInit() and delete BoatIotSdkDeInit() in platon test cases
  • Loading branch information
PanHH authored Aug 12, 2022
2 parents f2e0e86 + 05f3a41 commit 761a211
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/BoAT_platon_linuxDefault/01Wallet.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ START_TEST(test_001CreateWallet_0001CreateOneTimeWalletSuccess)
{
BSINT32 rtnVal;
BoatPlatONWallet *g_platon_wallet_ptr = NULL;
BoatIotSdkInit();
BoatPlatONWalletConfig wallet = get_platon_wallet_settings();
extern BoatIotSdkContext g_boat_iot_sdk_context;

Expand Down Expand Up @@ -114,7 +115,6 @@ START_TEST(test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig)

/* 3-2. verify the global variables that be affected */
ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false);
BoatIotSdkDeInit();
}
END_TEST

Expand Down Expand Up @@ -157,6 +157,7 @@ START_TEST(test_001CreateWallet_0004CreateLoadWalletSuccess)
{
BSINT32 rtnVal;
BoatPlatONWallet *g_platon_wallet_ptr = NULL;
BoatIotSdkInit();
extern BoatIotSdkContext g_boat_iot_sdk_context;

/* 1. execute unit test */
Expand Down Expand Up @@ -191,7 +192,6 @@ START_TEST(test_001CreateWallet_0005CreateLoadWalletFailureNoExist)
/* 2-2. verify the global variables that be affected */
ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true);
ck_assert(g_boat_iot_sdk_context.wallet_list[1].is_used == false);
BoatIotSdkDeInit();
}
END_TEST

Expand All @@ -210,7 +210,6 @@ START_TEST(test_001CreateWallet_0006CreateOneTimeWalletFailureShortSize)

/* 2-2. verify the global variables that be affected */
ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false);
BoatIotSdkDeInit();
}
END_TEST

Expand All @@ -229,7 +228,6 @@ START_TEST(test_001CreateWallet_0007CreateOneTimeWalletSuccessLongSize)

/* 2-2. verify the global variables that be affected */
ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false);
BoatIotSdkDeInit();
}
END_TEST

Expand All @@ -246,7 +244,6 @@ START_TEST(test_001CreateWallet_0008CreateOneTimeWalletFailureProtocolUnknown)

/* 2-2. verify the global variables that be affected */
ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false);
BoatIotSdkDeInit();
}
END_TEST

Expand Down

0 comments on commit 761a211

Please sign in to comment.