mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
@@ -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<char>(in)),
|
||||
std::istreambuf_iterator<char>());
|
||||
}
|
||||
|
||||
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 {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user