- Project.h/cpp:toml++ 解析 + 字段白名单(未知键带行号报错)、name/entry/cycle_limit/dt_ms/files.st 必填、io 条目完整性、entry 必须 program MAIN - compile_files:files.st ∪ gvl.file 去重;compute_project_hash:路径排序后 FNV-1a 64 增量,缺文件报 file missing - STCompiler <project.toml>:打印文件列表与哈希,失败退出码 1,--help - compiler 私有链接 toml++ v3.4.0;测试固化 compiler_toml(35 断言,line1 哈希冻结 0xc3fe4ae74ad45900)
26 lines
815 B
CMake
26 lines
815 B
CMake
# 自动化用例
|
|
add_test(NAME stcompiler_version
|
|
COMMAND STCompiler)
|
|
add_test(NAME bytecode_executor_version
|
|
COMMAND BytecodeExecutor)
|
|
|
|
# isa 合同测试:链接 isa 库,断言覆盖饱和/编解码/disasm/哈希/映像/sidecar
|
|
add_executable(isa_test
|
|
./src/isa_test.cpp)
|
|
|
|
target_link_libraries(isa_test PRIVATE isa)
|
|
|
|
add_test(NAME isa_roundtrip
|
|
COMMAND isa_test)
|
|
|
|
# compiler 库测试:toml schema、文件集合、工程哈希(REPO_ROOT 注入源目录绝对路径)
|
|
add_executable(compiler_test
|
|
./src/compiler_test.cpp)
|
|
|
|
target_link_libraries(compiler_test PRIVATE compiler)
|
|
target_compile_definitions(compiler_test PRIVATE
|
|
REPO_ROOT="${CMAKE_SOURCE_DIR}")
|
|
|
|
add_test(NAME compiler_toml
|
|
COMMAND compiler_test)
|