Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/tests/blendfile_loading_base_test.cc
| Show All 21 Lines | |||||
| #include "BKE_appdir.h" | #include "BKE_appdir.h" | ||||
| #include "BKE_blender.h" | #include "BKE_blender.h" | ||||
| #include "BKE_callbacks.h" | #include "BKE_callbacks.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_idtype.h" | #include "BKE_idtype.h" | ||||
| #include "BKE_image.h" | #include "BKE_image.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_mball_tessellate.h" | |||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_vfont.h" | |||||
| #include "BLI_path_util.h" | #include "BLI_path_util.h" | ||||
| #include "BLI_threads.h" | #include "BLI_threads.h" | ||||
| #include "BLO_readfile.h" | #include "BLO_readfile.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| #include "DNA_genfile.h" /* for DNA_sdna_current_init() */ | #include "DNA_genfile.h" /* for DNA_sdna_current_init() */ | ||||
| #include "DNA_windowmanager_types.h" | #include "DNA_windowmanager_types.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "ED_datafiles.h" | |||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "wm.h" | #include "wm.h" | ||||
| #include "GHOST_Path-api.h" | #include "GHOST_Path-api.h" | ||||
| #include "CLG_log.h" | #include "CLG_log.h" | ||||
| Show All 13 Lines | void BlendfileLoadingBaseTest::SetUpTestCase() | ||||
| BKE_idtype_init(); | BKE_idtype_init(); | ||||
| BKE_appdir_init(); | BKE_appdir_init(); | ||||
| IMB_init(); | IMB_init(); | ||||
| BKE_modifier_init(); | BKE_modifier_init(); | ||||
| DEG_register_node_types(); | DEG_register_node_types(); | ||||
| RNA_init(); | RNA_init(); | ||||
| BKE_node_system_init(); | BKE_node_system_init(); | ||||
| BKE_callback_global_init(); | BKE_callback_global_init(); | ||||
| BKE_vfont_builtin_register(datatoc_bfont_pfb, datatoc_bfont_pfb_size); | |||||
| G.background = true; | G.background = true; | ||||
| G.factory_startup = true; | G.factory_startup = true; | ||||
| /* Allocate a dummy window manager. The real window manager will try and load Python scripts from | /* Allocate a dummy window manager. The real window manager will try and load Python scripts from | ||||
| * the release directory, which it won't be able to find. */ | * the release directory, which it won't be able to find. */ | ||||
| ASSERT_EQ(G.main->wm.first, nullptr); | ASSERT_EQ(G.main->wm.first, nullptr); | ||||
| G.main->wm.first = MEM_callocN(sizeof(wmWindowManager), __func__); | G.main->wm.first = MEM_callocN(sizeof(wmWindowManager), __func__); | ||||
| Show All 22 Lines | void BlendfileLoadingBaseTest::TearDownTestCase() | ||||
| BKE_appdir_exit(); | BKE_appdir_exit(); | ||||
| CLG_exit(); | CLG_exit(); | ||||
| testing::Test::TearDownTestCase(); | testing::Test::TearDownTestCase(); | ||||
| } | } | ||||
| void BlendfileLoadingBaseTest::TearDown() | void BlendfileLoadingBaseTest::TearDown() | ||||
| { | { | ||||
| BKE_mball_cubeTable_free(); | |||||
| depsgraph_free(); | depsgraph_free(); | ||||
| blendfile_free(); | blendfile_free(); | ||||
| testing::Test::TearDown(); | testing::Test::TearDown(); | ||||
| } | } | ||||
| bool BlendfileLoadingBaseTest::blendfile_load(const char *filepath) | bool BlendfileLoadingBaseTest::blendfile_load(const char *filepath) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||