mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-05-30 00:24:12 +08:00
test: strengthen assertions, add sorted SDC diff, and clean up tests
- Split oversized test files to stay under 5,000 lines per file: TestSdc.cc → TestSdcClasses.cc, TestSdcStaInit.cc, TestSdcStaDesign.cc TestSearchStaDesign.cc → TestSearchStaDesign.cc, TestSearchStaDesignB.cc TestLibertyStaBasics.cc → TestLibertyStaBasics.cc, TestLibertyStaBasicsB.cc TestNetwork.cc → TestNetwork.cc, TestNetworkB.cc - Replace ~200+ (void) casts with proper EXPECT_* assertions across all C++ test files (dcalc, liberty, network, sdc, search, power, spice, util) - Remove ~55 SUCCEED() and EXPECT_TRUE(true) no-op assertions - Fix 6 load-only Tcl tests by adding diff_files verification with 22 new .sdcok golden reference files - Delete 7 orphan .ok files with no matching .tcl tests - Add how_to_write_good_tests.md and TODO6.md documenting test quality rules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <cmath>
|
||||
#include <fstream>
|
||||
#include <cstdio>
|
||||
#include <unistd.h>
|
||||
@@ -1794,7 +1795,7 @@ TEST_F(SpiceDesignTest, VertexArrivalForSpice) {
|
||||
ASSERT_NE(v, nullptr);
|
||||
Arrival arr = sta_->vertexArrival(v, MinMax::max());
|
||||
// Arrival should be finite (not INF)
|
||||
(void)arr;
|
||||
EXPECT_FALSE(std::isinf(delayAsFloat(arr)));
|
||||
}
|
||||
|
||||
// Verify PathExpanded works on timing paths (used in SPICE path writing)
|
||||
|
||||
Reference in New Issue
Block a user