Skip to content

Commit 9174447

Browse files
committed
Add a test.
Signed-off-by: Sean Luchen <seanluchen@google.com>
1 parent 86e8046 commit 9174447

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/gpl/test/mbff_test.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class MBFFTestPeer
3131
{
3232
return uut->network_->isValidTray(tray);
3333
}
34+
static void ReadLibs(MBFF* uut) { uut->ReadLibs(); }
3435
};
3536

3637
namespace {
@@ -146,5 +147,13 @@ TEST_F(MBFFTestFixture, FlopsCanBeIdentifiedAsATrayAndNot)
146147
mbff_.get(), CreateTmpCell("test_tray", "test0", "MBFF2SECLPS")));
147148
}
148149

150+
TEST_F(MBFFTestFixture, ReadLibsSuccessfullyProcessesTestCells)
151+
{
152+
// In test0.lib, cells like MBFF2SE have their sequential definition
153+
// nested inside a test_cell block. Without consistent Liberty cell views,
154+
// GetPinMapping returns empty vectors and triggers an out-of-bounds crash.
155+
EXPECT_NO_FATAL_FAILURE(MBFFTestPeer::ReadLibs(mbff_.get()));
156+
}
157+
149158
} // namespace
150159
} // namespace gpl

0 commit comments

Comments
 (0)