From 79a0a6a964098cc58f9036a5e94cd512ce4a6664 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Mon, 18 Sep 2023 17:50:22 +0800 Subject: [PATCH] improve tests --- docs/changes.md | 1 + tests/image_manager_test.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changes.md b/docs/changes.md index b82811fdf..245d36521 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -2,6 +2,7 @@ 2023/09/18 * 修复打包工具打包有特殊字符导名字的资源导致断言的问题(感谢智明提供补丁) * 修复测试用例崩溃问题(感谢智明提供补丁) + * 修复gtest不过的问题(感谢智明提供补丁) 2023/09/15 * 修复 path\_basename\_ex 的对于混合斜杆不支持的问题(感谢智明提供补丁) diff --git a/tests/image_manager_test.cc b/tests/image_manager_test.cc index b1cb11d4f..468a7971f 100644 --- a/tests/image_manager_test.cc +++ b/tests/image_manager_test.cc @@ -1,5 +1,6 @@ #include #include "gtest/gtest.h" +#include "base/locale_info.h" #include "base/image_manager.h" #include "image_loader/image_loader_stb.h" #include @@ -73,7 +74,8 @@ TEST(ImageManager, locale) { memset(&bmp, 0x00, sizeof(bmp)); image_manager_t* imm = image_manager_create(); assets_manager_t* am = assets_manager_create(0); - + + locale_info_change(locale_info(), "en", "US"); assets_manager_set_res_root(am, "tests/testdata"); image_manager_set_assets_manager(imm, am);