Changeset View
Changeset View
Standalone View
Standalone View
source/blender/asset_system/tests/asset_catalog_test.cc
- This file was moved from source/blender/blenkernel/intern/asset_catalog_test.cc.
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2020 Blender Foundation. All rights reserved. */ | * Copyright 2020 Blender Foundation. All rights reserved. */ | ||||
| #include "AS_asset_catalog.hh" | |||||
| #include "BKE_appdir.h" | #include "BKE_appdir.h" | ||||
| #include "BKE_asset_catalog.hh" | |||||
| #include "BKE_preferences.h" | #include "BKE_preferences.h" | ||||
| #include "BLI_fileops.h" | #include "BLI_fileops.h" | ||||
| #include "BLI_path_util.h" | #include "BLI_path_util.h" | ||||
| #include "DNA_asset_types.h" | #include "DNA_asset_types.h" | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "CLG_log.h" | #include "CLG_log.h" | ||||
| #include "testing/testing.h" | #include "testing/testing.h" | ||||
| namespace blender::bke::tests { | namespace blender::asset_system::tests { | ||||
| /* UUIDs from lib/tests/asset_library/blender_assets.cats.txt */ | /* UUIDs from lib/tests/asset_library/blender_assets.cats.txt */ | ||||
| const bUUID UUID_ID_WITHOUT_PATH("e34dd2c5-5d2e-4668-9794-1db5de2a4f71"); | const bUUID UUID_ID_WITHOUT_PATH("e34dd2c5-5d2e-4668-9794-1db5de2a4f71"); | ||||
| const bUUID UUID_POSES_ELLIE("df60e1f6-2259-475b-93d9-69a1b4a8db78"); | const bUUID UUID_POSES_ELLIE("df60e1f6-2259-475b-93d9-69a1b4a8db78"); | ||||
| const bUUID UUID_POSES_ELLIE_WHITESPACE("b06132f6-5687-4751-a6dd-392740eb3c46"); | const bUUID UUID_POSES_ELLIE_WHITESPACE("b06132f6-5687-4751-a6dd-392740eb3c46"); | ||||
| const bUUID UUID_POSES_ELLIE_TRAILING_SLASH("3376b94b-a28d-4d05-86c1-bf30b937130d"); | const bUUID UUID_POSES_ELLIE_TRAILING_SLASH("3376b94b-a28d-4d05-86c1-bf30b937130d"); | ||||
| const bUUID UUID_POSES_ELLIE_BACKSLASHES("a51e17ae-34fc-47d5-ba0f-64c2c9b771f7"); | const bUUID UUID_POSES_ELLIE_BACKSLASHES("a51e17ae-34fc-47d5-ba0f-64c2c9b771f7"); | ||||
| const bUUID UUID_POSES_RUZENA("79a4f887-ab60-4bd4-94da-d572e27d6aed"); | const bUUID UUID_POSES_RUZENA("79a4f887-ab60-4bd4-94da-d572e27d6aed"); | ||||
| ▲ Show 20 Lines • Show All 1,506 Lines • ▼ Show 20 Lines | EXPECT_TRUE(service.is_undo_possbile()) | ||||
| << "After storing an undo snapshot, undoing should be possible"; | << "After storing an undo snapshot, undoing should be possible"; | ||||
| EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE)->simple_name, "Ellie Simple"); /* Not undone. */ | EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE)->simple_name, "Ellie Simple"); /* Not undone. */ | ||||
| EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE_WHITESPACE)->simple_name, | EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE_WHITESPACE)->simple_name, | ||||
| "POSES_ELLIE WHITESPACE"); /* Undone. */ | "POSES_ELLIE WHITESPACE"); /* Undone. */ | ||||
| EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE)->path, "character/Ellie/poselib"); /* Undone. */ | EXPECT_EQ(service.find_catalog(UUID_POSES_ELLIE)->path, "character/Ellie/poselib"); /* Undone. */ | ||||
| } | } | ||||
| } // namespace blender::bke::tests | } // namespace blender::asset_system::tests | ||||