mirror of
https://github.com/LHY0125/PathEditor.git
synced 2026-05-10 02:09:46 +08:00
feat(test): 添加单元测试框架并完善国际化支持
- 新增 CMake 测试框架配置,支持 safe_string、string_ext 和 path_manager 模块的单元测试 - 实现 Windows API Mock 机制,便于测试编码转换函数 - 添加 error_code 模块的字符串表示函数,支持英文错误日志 - 在 UI 回调函数中集成国际化翻译,覆盖新建、编辑、导入导出等操作提示 - 扩展 string_list 功能,新增重复路径检查函数 - 更新翻译文件,同步所有用户界面的中英文文本
This commit is contained in:
@@ -15,6 +15,7 @@ typedef enum {
|
||||
ERR_INVALID_INDEX = -10 // 无效索引
|
||||
} ErrorCode;
|
||||
|
||||
// 获取错误码的字符串表示(英文,用于日志)
|
||||
const char* error_code_to_string(ErrorCode code);
|
||||
|
||||
#endif // ERROR_CODE_H
|
||||
|
||||
@@ -27,4 +27,7 @@ char *wide_to_utf8(const wchar_t *wstr);
|
||||
wchar_t *utf8_to_wide(const char *str);
|
||||
char *stristr(const char *haystack, const char *needle);
|
||||
|
||||
// 检查字符串列表中是否存在指定路径(不区分大小写)
|
||||
int string_list_contains(const StringList *list, const char *str);
|
||||
|
||||
#endif // STRING_EXT_H
|
||||
|
||||
Reference in New Issue
Block a user