#include <iostream>
#include "test_framework.hpp"
#include "lsp_any_test.hpp"
#include "transformer_test.hpp"
#include "facade_test.hpp"
#include "common_test.hpp"

int main()
{
    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();
}
