Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-08-02 13:07:40 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-08-02 13:07:55 +0300
commitaa60416361364f56f9a173db9649e36f81442ce3 (patch)
tree17b88a2e3879eef89b93d450d9efb816b13b1e99 /source/blender/blenkernel/intern/asset_catalog_test.cc
parent06cb48e1b284e6438ce14f1ea543143fcc74ca59 (diff)
Revert "Asset Catalogs: loading a catalog definition file"
This reverts commit 1f0d6f763573b22772dcdb61320a12e1c11949e0 and the cleanup 06cb48e1b284e6438ce14f1ea543143fcc74ca59. Committed too early on Monday morning, still has issues that should be resolved first.
Diffstat (limited to 'source/blender/blenkernel/intern/asset_catalog_test.cc')
-rw-r--r--source/blender/blenkernel/intern/asset_catalog_test.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/source/blender/blenkernel/intern/asset_catalog_test.cc b/source/blender/blenkernel/intern/asset_catalog_test.cc
deleted file mode 100644
index d6c00670bd6..00000000000
--- a/source/blender/blenkernel/intern/asset_catalog_test.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2020 Blender Foundation
- * All rights reserved.
- */
-
-#include "BKE_asset_catalog.hh"
-
-#include "testing/testing.h"
-
-#include <filesystem>
-
-namespace fs = std::filesystem;
-
-namespace blender::bke::tests {
-
-TEST(AssetCatalogTest, load_single_file)
-{
- const fs::path test_files_dir = blender::tests::flags_test_asset_dir();
- if (test_files_dir.empty()) {
- FAIL();
- }
-
- AssetCatalogService service;
- service.load_from_disk(test_files_dir / "asset_library/single_catalog_definition_file.cats.txt");
-
- // Test getting a non-existant catalog ID.
- EXPECT_EQ(nullptr, service.find_catalog("NONEXISTANT"));
-
- // Test getting a 7-bit ASCII catalog ID.
- AssetCatalog *poses_elly = service.find_catalog("POSES_ELLY");
- ASSERT_NE(nullptr, poses_elly);
- EXPECT_EQ("POSES_ELLY", poses_elly->catalog_id);
- EXPECT_EQ("character/Elly/poselib", poses_elly->path);
-
- // Test whitespace stripping.
- AssetCatalog *poses_whitespace = service.find_catalog("POSES_ELLY_WHITESPACE");
- ASSERT_NE(nullptr, poses_whitespace);
- EXPECT_EQ("POSES_ELLY_WHITESPACE", poses_whitespace->catalog_id);
- EXPECT_EQ("character/Elly/poselib/whitespace", poses_whitespace->path);
-
- // Test getting a UTF-8 catalog ID.
- AssetCatalog *poses_ruzena = service.find_catalog("POSES_RUŽENA");
- ASSERT_NE(nullptr, poses_ruzena);
- EXPECT_EQ("POSES_RUŽENA", poses_ruzena->catalog_id);
- EXPECT_EQ("character/Ružena/poselib", poses_ruzena->path);
-}
-
-} // namespace blender::bke::tests