Code Review :代码审查 + 产物体积 −12.2%(890,880 → 782,336 B)+ 面板结构收敛 + 离屏验证工具入库 #3
No files matched your search
@@ -160,18 +160,30 @@ int main(int argc, char** argv)
|
||||
|
||||
EnsureDirectory(options.outDir);
|
||||
|
||||
// 报告路径同样要能在两种工作目录下工作(见上面 `-data` 的说明)。
|
||||
g_report = std::fopen(reportPath.c_str(), "wb");
|
||||
if (g_report == nullptr && reportPath.rfind("../Temp/", 0) == 0)
|
||||
{
|
||||
reportPath = reportPath.substr(3); // 去掉 "../"
|
||||
g_report = std::fopen(reportPath.c_str(), "wb");
|
||||
}
|
||||
|
||||
EmitLine("==============================================================\n");
|
||||
EmitLine(" Just DataInspector - offscreen checks\n");
|
||||
EmitLine(" mode=%s out=%s report=%s\n", options.mode.c_str(), options.outDir.c_str(), reportPath.c_str());
|
||||
EmitLine("==============================================================\n");
|
||||
|
||||
// 数据文件:命令行优先,否则在 TestData 里挑一个可用的样本
|
||||
// 数据文件:命令行优先,否则在 TestData 里挑一个可用的样本。
|
||||
// ⚠️ 默认路径同时支持「在 Tools/ 下运行」与「在仓库根目录运行」两种习惯:
|
||||
// 前者要 `../TestData/...`,后者要 `TestData/...`。只认一种会让另一种
|
||||
// 静默报 "no data file"(本轮就踩过,容易被误认为工具坏了)。
|
||||
if (options.dataPath.empty())
|
||||
{
|
||||
static const char* const candidates[] = {"../TestData/SCATTER_TEST.csv", "../TestData/[1].CSV",
|
||||
"../TestData/BIG_DATA.csv", "../TestData/Problem_Data.CSV"};
|
||||
static const char* const candidates[] = {"../TestData/SCATTER_TEST.csv", "TestData/SCATTER_TEST.csv",
|
||||
"../TestData/[1].CSV", "TestData/[1].CSV",
|
||||
"../TestData/BIG_DATA.csv", "TestData/BIG_DATA.csv",
|
||||
"../TestData/Problem_Data.CSV",
|
||||
"TestData/Problem_Data.CSV"};
|
||||
for (const char* const candidate : candidates)
|
||||
{
|
||||
if (FileExists(candidate))
|
||||
|
||||
@@ -157,6 +157,14 @@ Tools\OffscreenChecks\Build\OffscreenChecks.exe -list
|
||||
`SCATTER_TEST.csv` → `[1].CSV` → `BIG_DATA.csv` → `Problem_Data.CSV`;
|
||||
`TestData/` 不入库,缺失时请用 `-data` 指定。
|
||||
|
||||
> 默认路径(数据 / 输出 / 报告)**同时支持在 `Tools/` 下运行和在仓库根目录运行**
|
||||
> (两种写法会自动回退),因此下面两种调用等价:
|
||||
> ```powershell
|
||||
> cd Tools ; .\OffscreenChecks\Build\OffscreenChecks.exe -all
|
||||
> .\Tools\OffscreenChecks\Build\OffscreenChecks.exe -all
|
||||
> ```
|
||||
> 显式 `-data` / `-out` / `-report` 仍以**当前工作目录**为准。
|
||||
|
||||
### 4.1 检查项
|
||||
|
||||
| 检查 | 做了什么 | 断言 / 判据 |
|
||||
|
||||
Reference in new issue
Block a user