mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-12-19 07:49:09 +00:00
commit
174aceaa75
@ -4516,9 +4516,12 @@ HWTEST_F(Disc_ManagerTest, DiscSetDiscoverCallbackTest002, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(Disc_ManagerTest, DiscSetDiscoverCallbackTest003, TestSize.Level1)
|
||||
{
|
||||
int ret;
|
||||
DeviceInfo devInfo;
|
||||
DiscMgrInit();
|
||||
DiscStartDiscovery("pkgname1", &g_sInfo, &g_subscribeCb);
|
||||
ret = DiscStartDiscovery("pkgname1", &g_sInfo, &g_subscribeCb);
|
||||
TEST_ASSERT_TRUE(ret == 0);
|
||||
|
||||
devInfo.capabilityBitmap[0] = TEST_BITMAP_CAP;
|
||||
TestInnerDeviceFound(&devInfo, NULL);
|
||||
DiscMgrDeinit();
|
||||
|
@ -30,7 +30,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
static int g_publishId = 0;
|
||||
static const char *g_pkgName = "com.softbus.test";
|
||||
static const char *g_pkgName_1 = "com.softbus.test1";
|
||||
static const char *g_pkgName1 = "com.softbus.test1";
|
||||
static const char *g_erroPkgName1 = "ErroErroErroErroErroErroErroErroErroErroErroErroErroErroErroErroEErroE";
|
||||
|
||||
const int32_t ERRO_CAPDATA_LEN = 514;
|
||||
@ -174,9 +174,9 @@ HWTEST_F(BusCenterSdkPublish, PublishLNNTest002, TestSize.Level0)
|
||||
EXPECT_TRUE(ret == 0);
|
||||
|
||||
g_newpInfo1.publishId = GetPublishId();
|
||||
ret = PublishLNN(g_pkgName_1, &g_newpInfo1, &g_publishCb);
|
||||
ret = PublishLNN(g_pkgName1, &g_newpInfo1, &g_publishCb);
|
||||
EXPECT_TRUE(ret == 0);
|
||||
ret = StopPublishLNN(g_pkgName_1, g_newpInfo1.publishId);
|
||||
ret = StopPublishLNN(g_pkgName1, g_newpInfo1.publishId);
|
||||
EXPECT_TRUE(ret == 0);
|
||||
}
|
||||
|
@ -27,9 +27,9 @@ using namespace testing::ext;
|
||||
#define TEST_ERRO_MOUDULE ((MODULE_LNN) + 3)
|
||||
|
||||
namespace OHOS {
|
||||
static int subscribeId = 0;
|
||||
static int g_subscribeId = 0;
|
||||
static const char *g_pkgName = "com.softbus.test";
|
||||
static const char *g_pkgName_1 = "com.softbus.test1";
|
||||
static const char *g_pkgName1 = "com.softbus.test1";
|
||||
static const char *g_erroPkgName = "ErroErroErroErroErroErroErroErroErroErroErroErroErroErroErroErroEErroE";
|
||||
|
||||
const int32_t ERRO_CAPDATA_LEN = 514;
|
||||
@ -56,8 +56,8 @@ void BusCenterSdkRefresh::TearDownTestCase(void)
|
||||
|
||||
static int GetSubscribeId(void)
|
||||
{
|
||||
subscribeId++;
|
||||
return subscribeId;
|
||||
g_subscribeId++;
|
||||
return g_subscribeId;
|
||||
}
|
||||
|
||||
static SubscribeInfo g_sInfo2 = {
|
||||
@ -187,9 +187,9 @@ HWTEST_F(BusCenterSdkRefresh, RefreshLNNTest003, TestSize.Level0)
|
||||
ret = StopRefreshLNN(g_pkgName, g_sInfo3.subscribeId);
|
||||
|
||||
g_sInfo3.subscribeId = GetSubscribeId();
|
||||
ret = RefreshLNN(g_pkgName_1, &g_sInfo3, &g_refreshCb1);
|
||||
ret = RefreshLNN(g_pkgName1, &g_sInfo3, &g_refreshCb1);
|
||||
EXPECT_TRUE(ret == 0);
|
||||
ret = StopRefreshLNN(g_pkgName_1, g_sInfo3.subscribeId);
|
||||
ret = StopRefreshLNN(g_pkgName1, g_sInfo3.subscribeId);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -479,9 +479,9 @@ HWTEST_F(BusCenterSdkRefresh, RefreshLNNTest010, TestSize.Level0)
|
||||
ret = StopRefreshLNN(g_pkgName, g_sInfo3.subscribeId);
|
||||
|
||||
g_sInfo3.subscribeId = GetSubscribeId();
|
||||
ret = RefreshLNN(g_pkgName_1, &g_sInfo3, &g_refreshCb1);
|
||||
ret = RefreshLNN(g_pkgName1, &g_sInfo3, &g_refreshCb1);
|
||||
EXPECT_TRUE(ret == 0);
|
||||
ret = StopRefreshLNN(g_pkgName_1, g_sInfo3.subscribeId);
|
||||
ret = StopRefreshLNN(g_pkgName1, g_sInfo3.subscribeId);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -965,9 +965,9 @@ HWTEST_F(BusCenterSdkRefresh, RefreshLNNTest024, TestSize.Level0)
|
||||
ret = StopRefreshLNN(g_pkgName, g_sInfo3.subscribeId);
|
||||
|
||||
g_sInfo3.subscribeId = GetSubscribeId();
|
||||
ret = RefreshLNN(g_pkgName_1, &g_sInfo3, &g_refreshCb1);
|
||||
ret = RefreshLNN(g_pkgName1, &g_sInfo3, &g_refreshCb1);
|
||||
EXPECT_TRUE(ret == 0);
|
||||
ret = StopRefreshLNN(g_pkgName_1, g_sInfo3.subscribeId);
|
||||
ret = StopRefreshLNN(g_pkgName1, g_sInfo3.subscribeId);
|
||||
}
|
||||
|
||||
/**
|
@ -29,7 +29,7 @@ namespace OHOS {
|
||||
static int g_subscribeId = 0;
|
||||
static int g_publishId = 0;
|
||||
static const char *g_pkgName = "Softbus_Kits";
|
||||
static const char *g_pkgName_1 = "Softbus_Kits_1";
|
||||
static const char *g_pkgName1 = "Softbus_Kits_1";
|
||||
static const char *g_erroPkgName = "Softbus_Erro_Kits";
|
||||
|
||||
class DiscSdkTestBle : public testing::Test {
|
||||
@ -961,7 +961,7 @@ HWTEST_F(DiscSdkTestBle, UnpublishServiceTest001, TestSize.Level1)
|
||||
ret = UnPublishService(g_erroPkgName, tmpId);
|
||||
EXPECT_TRUE(ret != 0);
|
||||
|
||||
ret = UnPublishService(g_pkgName_1, tmpId);
|
||||
ret = UnPublishService(g_pkgName1, tmpId);
|
||||
EXPECT_TRUE(ret != 0);
|
||||
}
|
||||
|
||||
@ -1237,7 +1237,7 @@ HWTEST_F(DiscSdkTestBle, StopDiscoveryTest001, TestSize.Level1)
|
||||
ret = StopDiscovery(g_erroPkgName, tmpId);
|
||||
EXPECT_TRUE(ret != 0);
|
||||
|
||||
ret = StopDiscovery(g_pkgName_1, tmpId);
|
||||
ret = StopDiscovery(g_pkgName1, tmpId);
|
||||
EXPECT_TRUE(ret != 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user