- export Run() from launcher module and add non-module main TU - apply same pattern to module-based test executables - migrate utils/string implementation fully into string.cppm and drop string.cpp - point clangd to linux build compilation database
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
module;
|
|
|
|
export module lsp.test.lsp_any.main;
|
|
|
|
import std;
|
|
|
|
import lsp.test.framework;
|
|
import lsp.test.lsp_any.lsp_any;
|
|
import lsp.test.lsp_any.transformer;
|
|
import lsp.test.lsp_any.facade;
|
|
import lsp.test.lsp_any.common;
|
|
|
|
export int Run()
|
|
{
|
|
lsp::test::TestRunner runner;
|
|
|
|
std::cout << "\n========================================" << std::endl;
|
|
std::cout << " LSP Transform 库单元测试套件" << std::endl;
|
|
std::cout << "========================================\n"
|
|
<< std::endl;
|
|
|
|
// 注册所有测试
|
|
std::cout << "正在注册测试..." << std::endl;
|
|
|
|
std::cout << " - LSPAny 基本功能测试" << std::endl;
|
|
lsp::test::LSPAnyTests::registerTests(runner);
|
|
|
|
std::cout << " - Transformer 转换功能测试" << std::endl;
|
|
lsp::test::TransformerTests::registerTests(runner);
|
|
|
|
std::cout << " - Facade 接口测试" << std::endl;
|
|
lsp::test::FacadeTests::registerTests(runner);
|
|
|
|
std::cout << " - Common 类型特征测试" << std::endl;
|
|
lsp::test::CommonTests::registerTests(runner);
|
|
|
|
// 运行所有测试
|
|
runner.runAllTests();
|
|
|
|
// 返回失败的测试数量(用于CI/CD)
|
|
return runner.getFailedCount();
|
|
}
|