From 2910df0b18bca951beff79ecfd6e9ad688e20f16 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Wed, 25 Mar 2026 16:06:38 +0000 Subject: [PATCH 1/3] cleanup#2 Signed-off-by: dsengupta0628 --- power/test/cpp/TestPower.cc | 1 - sdc/test/cpp/TestSdcClasses.cc | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/power/test/cpp/TestPower.cc b/power/test/cpp/TestPower.cc index 9db5b340..6ecedbb8 100644 --- a/power/test/cpp/TestPower.cc +++ b/power/test/cpp/TestPower.cc @@ -769,7 +769,6 @@ TEST_F(PowerDesignTest, PowerPerInstance) { int count = 0; while (child_iter->hasNext() && count < 5) { Instance *inst = child_iter->next(); - PowerResult result = sta_->power(inst, corner); count++; } delete child_iter; diff --git a/sdc/test/cpp/TestSdcClasses.cc b/sdc/test/cpp/TestSdcClasses.cc index b93185cf..b7378488 100644 --- a/sdc/test/cpp/TestSdcClasses.cc +++ b/sdc/test/cpp/TestSdcClasses.cc @@ -35,31 +35,6 @@ namespace sta { -static std::string -readTextFile(const char *filename) -{ - std::ifstream in(filename); - if (!in.is_open()) - return ""; - return std::string((std::istreambuf_iterator(in)), - std::istreambuf_iterator()); -} - -static size_t -countSubstring(const std::string &text, - const std::string &needle) -{ - if (needle.empty()) - return 0; - size_t count = 0; - size_t pos = 0; - while ((pos = text.find(needle, pos)) != std::string::npos) { - ++count; - pos += needle.size(); - } - return count; -} - // RiseFall tests class RiseFallTest : public ::testing::Test {}; From 9359303763e80a3628cc3ee61f9f96679d9d6739 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Wed, 25 Mar 2026 18:15:30 +0000 Subject: [PATCH 2/3] cleanup more Signed-off-by: dsengupta0628 --- power/test/cpp/TestPower.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power/test/cpp/TestPower.cc b/power/test/cpp/TestPower.cc index 6ecedbb8..c1f5bdab 100644 --- a/power/test/cpp/TestPower.cc +++ b/power/test/cpp/TestPower.cc @@ -768,7 +768,7 @@ TEST_F(PowerDesignTest, PowerPerInstance) { InstanceChildIterator *child_iter = network->childIterator(top); int count = 0; while (child_iter->hasNext() && count < 5) { - Instance *inst = child_iter->next(); + child_iter->next(); count++; } delete child_iter; From 35aef386d652ae71c1314ce39886c4cff9411967 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Wed, 25 Mar 2026 21:09:35 +0000 Subject: [PATCH 3/3] excercise the power func in sta test Signed-off-by: dsengupta0628 --- power/test/cpp/TestPower.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power/test/cpp/TestPower.cc b/power/test/cpp/TestPower.cc index c1f5bdab..2c37eb01 100644 --- a/power/test/cpp/TestPower.cc +++ b/power/test/cpp/TestPower.cc @@ -768,7 +768,7 @@ TEST_F(PowerDesignTest, PowerPerInstance) { InstanceChildIterator *child_iter = network->childIterator(top); int count = 0; while (child_iter->hasNext() && count < 5) { - child_iter->next(); + sta_->power(child_iter->next(), corner); count++; } delete child_iter;