Changeset View
Changeset View
Standalone View
Standalone View
source/blender/asset_system/tests/asset_catalog_path_test.cc
- This file was moved from source/blender/blenkernel/intern/asset_catalog_path_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 "BKE_asset_catalog_path.hh" | #include "AS_asset_catalog_path.hh" | ||||
| #include "BLI_set.hh" | #include "BLI_set.hh" | ||||
| #include "BLI_vector.hh" | #include "BLI_vector.hh" | ||||
| #include <set> | #include <set> | ||||
| #include <sstream> | #include <sstream> | ||||
| #include "testing/testing.h" | #include "testing/testing.h" | ||||
| namespace blender::bke::tests { | namespace blender::asset_system::tests { | ||||
| TEST(AssetCatalogPathTest, construction) | TEST(AssetCatalogPathTest, construction) | ||||
| { | { | ||||
| AssetCatalogPath default_constructed; | AssetCatalogPath default_constructed; | ||||
| /* Use `.str()` to use `std:string`'s comparison operators here, not our own (which are tested | /* Use `.str()` to use `std:string`'s comparison operators here, not our own (which are tested | ||||
| * later). */ | * later). */ | ||||
| EXPECT_EQ(default_constructed.str(), ""); | EXPECT_EQ(default_constructed.str(), ""); | ||||
| ▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | TEST(AssetCatalogPathTest, parent) | ||||
| const AssetCatalogPath one_level("one"); | const AssetCatalogPath one_level("one"); | ||||
| EXPECT_EQ(one_level.parent(), ""); | EXPECT_EQ(one_level.parent(), ""); | ||||
| const AssetCatalogPath empty(""); | const AssetCatalogPath empty(""); | ||||
| EXPECT_EQ(empty.parent(), ""); | EXPECT_EQ(empty.parent(), ""); | ||||
| } | } | ||||
| } // namespace blender::bke::tests | } // namespace blender::asset_system::tests | ||||