mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
bugfix
Signed-off-by: mengyiping <1091773127@qq.com>
This commit is contained in:
parent
4a0e4e9463
commit
7b5bed749e
@ -48,7 +48,8 @@ HWTEST_F(FrameRateReportTest, SendFrameRates001, TestSize.Level1)
|
||||
FrameRateReport::GetInstance().SendFrameRates(rates);
|
||||
rates[1008] = 60;
|
||||
rates[-1] = 120;
|
||||
FrameRateReport::GetInstance().SendFrameRates(rates);
|
||||
bool ret = FrameRateReport::GetInstance().SendFrameRates(rates);
|
||||
EXPECT_EQ(ret, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -101,6 +101,8 @@ HWTEST_F(RenderFrameTraceImplTest, RenderFrameTraceClose, TestSize.Level1)
|
||||
HWTEST_F(RenderFrameTraceImplTest, ui, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "ui";
|
||||
bool ret = RenderFrameTraceImpl::instance_->AccessFrameTrace();
|
||||
EXPECT_EQ(ret, true);
|
||||
RenderFrameTraceImpl::instance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTraceImpl::instance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
@ -114,6 +116,8 @@ HWTEST_F(RenderFrameTraceImplTest, ui, TestSize.Level1)
|
||||
HWTEST_F(RenderFrameTraceImplTest, renderthread, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "renderthread";
|
||||
bool ret = RenderFrameTraceImpl::instance_->AccessFrameTrace();
|
||||
EXPECT_EQ(ret, true);
|
||||
RenderFrameTraceImpl::instance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTraceImpl::instance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
@ -127,6 +131,8 @@ HWTEST_F(RenderFrameTraceImplTest, renderthread, TestSize.Level1)
|
||||
HWTEST_F(RenderFrameTraceImplTest, renderservice, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "renderservice";
|
||||
bool ret = RenderFrameTraceImpl::instance_->AccessFrameTrace();
|
||||
EXPECT_EQ(ret, true);
|
||||
RenderFrameTraceImpl::instance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTraceImpl::instance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
@ -140,6 +146,8 @@ HWTEST_F(RenderFrameTraceImplTest, renderservice, TestSize.Level1)
|
||||
HWTEST_F(RenderFrameTraceImplTest, test, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "test";
|
||||
bool ret = RenderFrameTraceImpl::instance_->AccessFrameTrace();
|
||||
EXPECT_EQ(ret, true);
|
||||
RenderFrameTraceImpl::instance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTraceImpl::instance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
|
@ -93,6 +93,7 @@ HWTEST_F(RenderFrameTraceTest, ui, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "ui";
|
||||
RenderFrameTrace::implInstance_ = &RenderFrameTrace::GetInstance();
|
||||
EXPECT_NE(RenderFrameTrace::implInstance_, nullptr);
|
||||
RenderFrameTrace::implInstance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTrace::implInstance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
@ -107,6 +108,7 @@ HWTEST_F(RenderFrameTraceTest, renderthread, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "renderthread";
|
||||
RenderFrameTrace::implInstance_ = &RenderFrameTrace::GetInstance();
|
||||
EXPECT_NE(RenderFrameTrace::implInstance_, nullptr);
|
||||
RenderFrameTrace::implInstance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTrace::implInstance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
@ -121,6 +123,7 @@ HWTEST_F(RenderFrameTraceTest, renderservice, TestSize.Level1)
|
||||
{
|
||||
const std::string traceTag = "renderservice";
|
||||
RenderFrameTrace::implInstance_ = &RenderFrameTrace::GetInstance();
|
||||
EXPECT_NE(RenderFrameTrace::implInstance_, nullptr);
|
||||
RenderFrameTrace::implInstance_->RenderStartFrameTrace(traceTag);
|
||||
RenderFrameTrace::implInstance_->RenderEndFrameTrace(traceTag);
|
||||
}
|
||||
|
@ -35,18 +35,6 @@ void RsFrameReportExtTest::TearDownTestCase() {}
|
||||
void RsFrameReportExtTest::SetUp() {}
|
||||
void RsFrameReportExtTest::TearDown() {}
|
||||
|
||||
/**
|
||||
* @tc.name: Init
|
||||
* @tc.desc: test
|
||||
* @tc.type:FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(RsFrameReportExtTest, Init001, Function | MediumTest | Level2)
|
||||
{
|
||||
OHOS::Rosen::RsFrameReportExt rsFrameReportExt_;
|
||||
rsFrameReportExt_.Init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: GetEnable
|
||||
* @tc.desc: test
|
||||
@ -55,8 +43,8 @@ HWTEST_F(RsFrameReportExtTest, Init001, Function | MediumTest | Level2)
|
||||
*/
|
||||
HWTEST_F(RsFrameReportExtTest, GetEnable001, Function | MediumTest | Level2)
|
||||
{
|
||||
OHOS::Rosen::RsFrameReportExt rsFrameReportExt_;
|
||||
rsFrameReportExt_.GetEnable();
|
||||
int ret = OHOS::Rosen::RsFrameReportExt::GetInstance().GetEnable();
|
||||
EXPECT_NE(ret, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,8 +55,8 @@ HWTEST_F(RsFrameReportExtTest, GetEnable001, Function | MediumTest | Level2)
|
||||
*/
|
||||
HWTEST_F(RsFrameReportExtTest, HandleSwapBuffer001, Function | MediumTest | Level2)
|
||||
{
|
||||
OHOS::Rosen::RsFrameReportExt rsFrameReportExt_;
|
||||
rsFrameReportExt_.HandleSwapBuffer();
|
||||
OHOS::Rosen::RsFrameReportExt::GetInstance().HandleSwapBuffer();
|
||||
EXPECT_NE(OHOS::Rosen::RsFrameReportExt::GetInstance().handleSwapBufferFunc_, nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -79,8 +67,8 @@ HWTEST_F(RsFrameReportExtTest, HandleSwapBuffer001, Function | MediumTest | Leve
|
||||
*/
|
||||
HWTEST_F(RsFrameReportExtTest, RequestNextVSync001, Function | MediumTest | Level2)
|
||||
{
|
||||
OHOS::Rosen::RsFrameReportExt rsFrameReportExt_;
|
||||
rsFrameReportExt_.RequestNextVSync();
|
||||
OHOS::Rosen::RsFrameReportExt::GetInstance().RequestNextVSync();
|
||||
EXPECT_NE(OHOS::Rosen::RsFrameReportExt::GetInstance().requestNextVSyncFunc_, nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,8 +79,8 @@ HWTEST_F(RsFrameReportExtTest, RequestNextVSync001, Function | MediumTest | Leve
|
||||
*/
|
||||
HWTEST_F(RsFrameReportExtTest, ReceiveVSync001, Function | MediumTest | Level2)
|
||||
{
|
||||
OHOS::Rosen::RsFrameReportExt rsFrameReportExt_;
|
||||
rsFrameReportExt_.ReceiveVSync();
|
||||
OHOS::Rosen::RsFrameReportExt::GetInstance().ReceiveVSync();
|
||||
EXPECT_NE(OHOS::Rosen::RsFrameReportExt::GetInstance().receiveVSyncFunc_, nullptr);
|
||||
}
|
||||
} // namespace Rosen
|
||||
} // namespace OHOS
|
||||
|
Loading…
Reference in New Issue
Block a user