2026-02-23 06:13:29 +01:00
|
|
|
macro(sta_cpp_test name)
|
|
|
|
|
add_executable(${name} ${name}.cc)
|
|
|
|
|
target_link_libraries(${name}
|
|
|
|
|
OpenSTA
|
|
|
|
|
GTest::gtest
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
${TCL_LIBRARY}
|
|
|
|
|
)
|
|
|
|
|
target_include_directories(${name} PRIVATE
|
|
|
|
|
${STA_HOME}/include/sta
|
|
|
|
|
${STA_HOME}
|
|
|
|
|
${CMAKE_BINARY_DIR}/include/sta
|
|
|
|
|
)
|
|
|
|
|
gtest_discover_tests(${name}
|
|
|
|
|
WORKING_DIRECTORY ${STA_HOME}
|
|
|
|
|
PROPERTIES LABELS "cpp;module_search"
|
|
|
|
|
)
|
|
|
|
|
endmacro()
|
2026-02-19 15:30:23 +01:00
|
|
|
|
2026-02-23 06:13:29 +01:00
|
|
|
sta_cpp_test(TestSearchClasses)
|
|
|
|
|
sta_cpp_test(TestSearchStaInit)
|
|
|
|
|
sta_cpp_test(TestSearchStaInitB)
|
|
|
|
|
sta_cpp_test(TestSearchStaDesign)
|
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>
2026-02-23 09:36:45 +01:00
|
|
|
sta_cpp_test(TestSearchStaDesignB)
|
2026-02-23 06:13:29 +01:00
|
|
|
sta_cpp_test(TestSearchIncremental)
|
|
|
|
|
|
|
|
|
|
# Compatibility aggregate target for legacy scripts that still build TestSearch.
|
|
|
|
|
add_custom_target(TestSearch
|
|
|
|
|
DEPENDS
|
|
|
|
|
TestSearchClasses
|
|
|
|
|
TestSearchStaInit
|
|
|
|
|
TestSearchStaInitB
|
|
|
|
|
TestSearchStaDesign
|
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>
2026-02-23 09:36:45 +01:00
|
|
|
TestSearchStaDesignB
|
2026-02-23 06:13:29 +01:00
|
|
|
TestSearchIncremental
|
2026-02-19 15:30:23 +01:00
|
|
|
)
|