* [misc] Enhance unit tests for metricZen::getViewTableWidth() method

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
liugang
2025-09-25 09:16:54 +08:00
co-authored by Claude
parent 0313d30d1f
commit d500a8e19c
+15 -1
View File
@@ -46,4 +46,18 @@ r($metricTest->getViewTableWidthZenTest(array(
array('name' => 'col1'),
array('name' => 'col2'),
array('name' => 'col3')
))) && p() && e(481); // 步骤5:全部headers无width属性
))) && p() && e(481); // 步骤5:全部headers无width属性
r($metricTest->getViewTableWidthZenTest(array(
array('name' => 'single', 'width' => 250)
))) && p() && e(251); // 步骤6:单个header测试
r($metricTest->getViewTableWidthZenTest(array(
array('name' => 'big1', 'width' => 5000),
array('name' => 'big2', 'width' => 3000)
))) && p() && e(8001); // 步骤7:大数值width测试
r($metricTest->getViewTableWidthZenTest(array(
array('name' => 'float1', 'width' => 150.5),
array('name' => 'float2', 'width' => 200.8)
))) && p() && e(352.3); // 步骤8:浮点数width测试