Cleanup: Use consistent camel case for test class names
This commit is contained in:
@@ -43,7 +43,7 @@ TEST(ANIM_bone_collections, bonecoll_default_name)
|
||||
}
|
||||
}
|
||||
|
||||
class ANIM_armature_bone_collections : public testing::Test {
|
||||
class ArmatureBoneCollections : public testing::Test {
|
||||
protected:
|
||||
bArmature arm;
|
||||
Bone bone1, bone2, bone3;
|
||||
@@ -78,7 +78,7 @@ class ANIM_armature_bone_collections : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, armature_owned_collections)
|
||||
TEST_F(ArmatureBoneCollections, armature_owned_collections)
|
||||
{
|
||||
BoneCollection *bcoll1 = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
BoneCollection *bcoll2 = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
@@ -90,7 +90,7 @@ TEST_F(ANIM_armature_bone_collections, armature_owned_collections)
|
||||
ANIM_armature_bonecoll_remove(&arm, bcoll2);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, collection_hierarchy_creation)
|
||||
TEST_F(ArmatureBoneCollections, collection_hierarchy_creation)
|
||||
{
|
||||
/* Implicit root: */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "wortel");
|
||||
@@ -146,7 +146,7 @@ TEST_F(ANIM_armature_bone_collections, collection_hierarchy_creation)
|
||||
/* TODO: test with deeper hierarchy. */
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, collection_hierarchy_removal)
|
||||
TEST_F(ArmatureBoneCollections, collection_hierarchy_removal)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -240,8 +240,7 @@ TEST_F(ANIM_armature_bone_collections, collection_hierarchy_removal)
|
||||
EXPECT_EQ(0, arm.collection_array[2]->child_count);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections,
|
||||
collection_hierarchy_removal__more_complex_remove_inner_child)
|
||||
TEST_F(ArmatureBoneCollections, collection_hierarchy_removal__more_complex_remove_inner_child)
|
||||
{
|
||||
/* Set up a slightly bigger hierarchy. Contrary to the other tests these are
|
||||
* actually declared in array order. */
|
||||
@@ -339,7 +338,7 @@ TEST_F(ANIM_armature_bone_collections,
|
||||
EXPECT_EQ(0, arm.collection_array[5]->child_count);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, collection_hierarchy_removal__more_complex_remove_root)
|
||||
TEST_F(ArmatureBoneCollections, collection_hierarchy_removal__more_complex_remove_root)
|
||||
{
|
||||
/* Set up a slightly bigger hierarchy. Contrary to the other tests these are
|
||||
* actually declared in array order. */
|
||||
@@ -411,7 +410,7 @@ TEST_F(ANIM_armature_bone_collections, collection_hierarchy_removal__more_comple
|
||||
EXPECT_EQ(0, arm.collection_array[6]->child_count);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, find_parent_index)
|
||||
TEST_F(ArmatureBoneCollections, find_parent_index)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -455,7 +454,7 @@ TEST_F(ANIM_armature_bone_collections, find_parent_index)
|
||||
EXPECT_EQ(2, armature_bonecoll_find_parent_index(&arm, 5));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, collection_hierarchy_visibility)
|
||||
TEST_F(ArmatureBoneCollections, collection_hierarchy_visibility)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root0 = ANIM_armature_bonecoll_new(&arm, "root0");
|
||||
@@ -520,7 +519,7 @@ TEST_F(ANIM_armature_bone_collections, collection_hierarchy_visibility)
|
||||
EXPECT_FALSE(bcoll_r0_child2->flags & BONE_COLLECTION_ANCESTORS_VISIBLE);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bones_assign_unassign)
|
||||
TEST_F(ArmatureBoneCollections, bones_assign_unassign)
|
||||
{
|
||||
BoneCollection *bcoll = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
|
||||
@@ -547,7 +546,7 @@ TEST_F(ANIM_armature_bone_collections, bones_assign_unassign)
|
||||
ANIM_armature_bonecoll_remove(&arm, bcoll);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bones_assign_remove)
|
||||
TEST_F(ArmatureBoneCollections, bones_assign_remove)
|
||||
{
|
||||
BoneCollection *bcoll = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
|
||||
@@ -563,7 +562,7 @@ TEST_F(ANIM_armature_bone_collections, bones_assign_remove)
|
||||
"removed";
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, active_set_clear_by_pointer)
|
||||
TEST_F(ArmatureBoneCollections, active_set_clear_by_pointer)
|
||||
{
|
||||
BoneCollection *bcoll1 = ANIM_armature_bonecoll_new(&arm, "Bones 1");
|
||||
BoneCollection *bcoll2 = ANIM_armature_bonecoll_new(&arm, "Bones 2");
|
||||
@@ -592,7 +591,7 @@ TEST_F(ANIM_armature_bone_collections, active_set_clear_by_pointer)
|
||||
ANIM_bonecoll_free(bcoll3);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, active_set_clear_by_index)
|
||||
TEST_F(ArmatureBoneCollections, active_set_clear_by_index)
|
||||
{
|
||||
BoneCollection *bcoll1 = ANIM_armature_bonecoll_new(&arm, "Bones 1");
|
||||
BoneCollection *bcoll2 = ANIM_armature_bonecoll_new(&arm, "Bones 2");
|
||||
@@ -618,7 +617,7 @@ TEST_F(ANIM_armature_bone_collections, active_set_clear_by_index)
|
||||
EXPECT_STREQ("", arm.active_collection_name);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_is_editable)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_is_editable)
|
||||
{
|
||||
BoneCollection *bcoll1 = ANIM_armature_bonecoll_new(&arm, "Bones 1");
|
||||
BoneCollection *bcoll2 = ANIM_armature_bonecoll_new(&arm, "Bones 2");
|
||||
@@ -652,7 +651,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_is_editable)
|
||||
<< "Expecting local bone collection on local armature override to be editable";
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_move_to_index__roots)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_move_to_index__roots)
|
||||
{
|
||||
BoneCollection *bcoll1 = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
BoneCollection *bcoll2 = ANIM_armature_bonecoll_new(&arm, "collection");
|
||||
@@ -687,7 +686,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_move_to_index__roots)
|
||||
EXPECT_EQ(arm.collection_array[3], bcoll1);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_move_to_index__siblings)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_move_to_index__siblings)
|
||||
{
|
||||
BoneCollection *root = ANIM_armature_bonecoll_new(&arm, "root");
|
||||
BoneCollection *child0 = ANIM_armature_bonecoll_new(&arm, "child0", 0);
|
||||
@@ -738,7 +737,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_move_to_index__siblings)
|
||||
EXPECT_STREQ(child1_0->name, arm.collection_array[4]->name);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_move_to_parent)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -877,7 +876,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent)
|
||||
EXPECT_EQ(0, arm.collection_array[5]->child_count);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent__root_unroot)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_move_to_parent__root_unroot)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -965,7 +964,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent__root_unroot)
|
||||
// TODO: test with circular parenthood.
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent__within_siblings)
|
||||
TEST_F(ArmatureBoneCollections, bcoll_move_to_parent__within_siblings)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
auto bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -1218,7 +1217,7 @@ TEST_F(ANIM_armature_bone_collections, bcoll_move_to_parent__within_siblings)
|
||||
EXPECT_EQ(0, arm.collection_array[6]->child_count);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections, internal__bonecolls_rotate_block)
|
||||
TEST_F(ArmatureBoneCollections, internal__bonecolls_rotate_block)
|
||||
{
|
||||
/* Set up a small hierarchy. */
|
||||
BoneCollection *bcoll_root_0 = ANIM_armature_bonecoll_new(&arm, "root_0");
|
||||
@@ -1283,7 +1282,7 @@ TEST_F(ANIM_armature_bone_collections, internal__bonecolls_rotate_block)
|
||||
EXPECT_EQ(0, arm.collection_array[5]->child_index);
|
||||
}
|
||||
|
||||
class ANIM_armature_bone_collections_testlist : public testing::Test {
|
||||
class ArmatureBoneCollectionsTestList : public testing::Test {
|
||||
protected:
|
||||
bArmature arm;
|
||||
|
||||
@@ -1352,7 +1351,7 @@ class ANIM_armature_bone_collections_testlist : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__before_first_sibling)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__before_first_sibling)
|
||||
{
|
||||
/* Set the active index to be one of the affected bone collections. */
|
||||
ANIM_armature_bonecoll_active_name_set(&arm, "child2");
|
||||
@@ -1368,14 +1367,14 @@ TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__before_
|
||||
EXPECT_STREQ("child2", arm.active_collection_name);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__after_first_sibling)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__after_first_sibling)
|
||||
{
|
||||
EXPECT_EQ(2, ANIM_armature_bonecoll_move_before_after_index(&arm, 3, 1, MoveLocation::After));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child0", "child2", "child1", "child1_0"}));
|
||||
EXPECT_EQ(0, armature_bonecoll_find_parent_index(&arm, 2));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__before_last_sibling)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__before_last_sibling)
|
||||
{
|
||||
/* Set the active index to be one of the affected bone collections. */
|
||||
ANIM_armature_bonecoll_active_name_set(&arm, "child1");
|
||||
@@ -1391,60 +1390,56 @@ TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__before_
|
||||
EXPECT_STREQ("child1", arm.active_collection_name);
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__after_last_sibling)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__after_last_sibling)
|
||||
{
|
||||
EXPECT_EQ(3, ANIM_armature_bonecoll_move_before_after_index(&arm, 1, 3, MoveLocation::After));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1", "child2", "child0", "child1_0"}));
|
||||
EXPECT_EQ(0, armature_bonecoll_find_parent_index(&arm, 3));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist,
|
||||
move_before_after_index__other_parent_before__move_left)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__other_parent_before__move_left)
|
||||
{
|
||||
EXPECT_EQ(1, ANIM_armature_bonecoll_move_before_after_index(&arm, 4, 1, MoveLocation::Before));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1_0", "child0", "child1", "child2"}));
|
||||
EXPECT_EQ(0, armature_bonecoll_find_parent_index(&arm, 1));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist,
|
||||
move_before_after_index__other_parent_after__move_left)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__other_parent_after__move_left)
|
||||
{
|
||||
EXPECT_EQ(2, ANIM_armature_bonecoll_move_before_after_index(&arm, 4, 1, MoveLocation::After));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child0", "child1_0", "child1", "child2"}));
|
||||
EXPECT_EQ(0, armature_bonecoll_find_parent_index(&arm, 2));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist,
|
||||
move_before_after_index__other_parent_before__move_right)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__other_parent_before__move_right)
|
||||
{
|
||||
EXPECT_EQ(3, ANIM_armature_bonecoll_move_before_after_index(&arm, 1, 4, MoveLocation::Before));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1", "child2", "child0", "child1_0"}));
|
||||
EXPECT_EQ(1, armature_bonecoll_find_parent_index(&arm, 3));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist,
|
||||
move_before_after_index__other_parent_after__move_right)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__other_parent_after__move_right)
|
||||
{
|
||||
EXPECT_EQ(4, ANIM_armature_bonecoll_move_before_after_index(&arm, 1, 4, MoveLocation::After));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1", "child2", "child1_0", "child0"}));
|
||||
EXPECT_EQ(1, armature_bonecoll_find_parent_index(&arm, 4));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__to_root__before)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__to_root__before)
|
||||
{
|
||||
EXPECT_EQ(0, ANIM_armature_bonecoll_move_before_after_index(&arm, 4, 0, MoveLocation::Before));
|
||||
EXPECT_TRUE(expect_bcolls({"child1_0", "root", "child0", "child1", "child2"}));
|
||||
EXPECT_EQ(-1, armature_bonecoll_find_parent_index(&arm, 0));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, move_before_after_index__to_root__after)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, move_before_after_index__to_root__after)
|
||||
{
|
||||
EXPECT_EQ(1, ANIM_armature_bonecoll_move_before_after_index(&arm, 4, 0, MoveLocation::After));
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1_0", "child0", "child1", "child2"}));
|
||||
EXPECT_EQ(-1, armature_bonecoll_find_parent_index(&arm, 1));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, child_number_set__roots)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, child_number_set__roots)
|
||||
{
|
||||
/* Test with only one root. */
|
||||
EXPECT_EQ(0, armature_bonecoll_child_number_set(&arm, root, 0));
|
||||
@@ -1474,7 +1469,7 @@ TEST_F(ANIM_armature_bone_collections_testlist, child_number_set__roots)
|
||||
EXPECT_TRUE(expect_bcolls({"root1", "root2", "root", "child0", "child1", "child2", "child1_0"}));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, child_number_set__siblings)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, child_number_set__siblings)
|
||||
{
|
||||
/* Move child0 to itself. */
|
||||
EXPECT_EQ(1, armature_bonecoll_child_number_set(&arm, child0, 0));
|
||||
@@ -1497,7 +1492,7 @@ TEST_F(ANIM_armature_bone_collections_testlist, child_number_set__siblings)
|
||||
EXPECT_TRUE(expect_bcolls({"root", "child1", "child2", "child0", "child1_0"}));
|
||||
}
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_testlist, bone_collection_solo)
|
||||
TEST_F(ArmatureBoneCollectionsTestList, bone_collection_solo)
|
||||
{
|
||||
EXPECT_FALSE(arm.flag & ARM_BCOLL_SOLO_ACTIVE) << "By default no solo'ing should be active";
|
||||
|
||||
@@ -1526,8 +1521,7 @@ TEST_F(ANIM_armature_bone_collections_testlist, bone_collection_solo)
|
||||
EXPECT_FALSE(arm.flag & ARM_BCOLL_SOLO_ACTIVE);
|
||||
}
|
||||
|
||||
class ANIM_armature_bone_collections_liboverrides
|
||||
: public ANIM_armature_bone_collections_testlist {
|
||||
class ArmatureBoneCollectionsLiboverrides : public ArmatureBoneCollectionsTestList {
|
||||
protected:
|
||||
bArmature dst_arm;
|
||||
|
||||
@@ -1539,7 +1533,7 @@ class ANIM_armature_bone_collections_liboverrides
|
||||
|
||||
void SetUp() override
|
||||
{
|
||||
ANIM_armature_bone_collections_testlist::SetUp();
|
||||
ArmatureBoneCollectionsTestList::SetUp();
|
||||
|
||||
/* TODO: make this clone `arm` into `dst_arm`, instead of assuming the below
|
||||
* code is still in sync with the super-class. */
|
||||
@@ -1564,12 +1558,12 @@ class ANIM_armature_bone_collections_liboverrides
|
||||
|
||||
void TearDown() override
|
||||
{
|
||||
ANIM_armature_bone_collections_testlist::TearDown();
|
||||
ArmatureBoneCollectionsTestList::TearDown();
|
||||
BKE_libblock_free_datablock(&dst_arm.id, 0);
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ANIM_armature_bone_collections_liboverrides, bcoll_insert_copy_after)
|
||||
TEST_F(ArmatureBoneCollectionsLiboverrides, bcoll_insert_copy_after)
|
||||
{
|
||||
/* Mimic that a new root, two children, and two grandchildren were added via library overrides.
|
||||
* These were saved in `arm`, and now need to be copied into `dst_arm`. */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
namespace blender::io::ply {
|
||||
|
||||
class ply_export_test : public BlendfileLoadingBaseTest {
|
||||
class PLYExportTest : public BlendfileLoadingBaseTest {
|
||||
public:
|
||||
bool load_file_and_depsgraph(const std::string &filepath,
|
||||
const eEvaluationMode eval_mode = DAG_EVAL_VIEWPORT)
|
||||
@@ -132,7 +132,7 @@ static std::vector<char> read_temp_file_in_vectorchar(const std::string &file_pa
|
||||
return res;
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteHeaderAscii)
|
||||
TEST_F(PLYExportTest, WriteHeaderAscii)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -170,7 +170,7 @@ TEST_F(ply_export_test, WriteHeaderAscii)
|
||||
ASSERT_STREQ(result.c_str(), expected.c_str());
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteHeaderBinary)
|
||||
TEST_F(PLYExportTest, WriteHeaderBinary)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -208,7 +208,7 @@ TEST_F(ply_export_test, WriteHeaderBinary)
|
||||
ASSERT_STREQ(result.c_str(), expected.c_str());
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteVerticesAscii)
|
||||
TEST_F(PLYExportTest, WriteVerticesAscii)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -240,7 +240,7 @@ TEST_F(ply_export_test, WriteVerticesAscii)
|
||||
ASSERT_STREQ(result.c_str(), expected.c_str());
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteVerticesBinary)
|
||||
TEST_F(PLYExportTest, WriteVerticesBinary)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -276,7 +276,7 @@ TEST_F(ply_export_test, WriteVerticesBinary)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteFacesAscii)
|
||||
TEST_F(PLYExportTest, WriteFacesAscii)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -306,7 +306,7 @@ TEST_F(ply_export_test, WriteFacesAscii)
|
||||
ASSERT_STREQ(result.c_str(), expected.c_str());
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteFacesBinary)
|
||||
TEST_F(PLYExportTest, WriteFacesBinary)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -342,7 +342,7 @@ TEST_F(ply_export_test, WriteFacesBinary)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteVertexNormalsAscii)
|
||||
TEST_F(PLYExportTest, WriteVertexNormalsAscii)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -374,7 +374,7 @@ TEST_F(ply_export_test, WriteVertexNormalsAscii)
|
||||
ASSERT_STREQ(result.c_str(), expected.c_str());
|
||||
}
|
||||
|
||||
TEST_F(ply_export_test, WriteVertexNormalsBinary)
|
||||
TEST_F(PLYExportTest, WriteVertexNormalsBinary)
|
||||
{
|
||||
std::string filePath = get_temp_ply_filename(temp_file_path);
|
||||
PLYExportParams _params = {};
|
||||
@@ -416,7 +416,7 @@ TEST_F(ply_export_test, WriteVertexNormalsBinary)
|
||||
}
|
||||
}
|
||||
|
||||
class ply_exporter_ply_data_test : public ply_export_test {
|
||||
class PLYExportPLYDataTest : public PLYExportTest {
|
||||
public:
|
||||
PlyData load_ply_data_from_blendfile(const std::string &blendfile, PLYExportParams ¶ms)
|
||||
{
|
||||
@@ -431,7 +431,7 @@ class ply_exporter_ply_data_test : public ply_export_test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ply_exporter_ply_data_test, CubeLoadPLYData)
|
||||
TEST_F(PLYExportPLYDataTest, CubeLoadPLYData)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
PlyData plyData = load_ply_data_from_blendfile("io_tests/blend_geometry/cube_all_data.blend",
|
||||
@@ -439,7 +439,7 @@ TEST_F(ply_exporter_ply_data_test, CubeLoadPLYData)
|
||||
EXPECT_EQ(plyData.vertices.size(), 8);
|
||||
EXPECT_EQ(plyData.uv_coordinates.size(), 0);
|
||||
}
|
||||
TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataUV)
|
||||
TEST_F(PLYExportPLYDataTest, CubeLoadPLYDataUV)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
params.export_uv = true;
|
||||
@@ -448,7 +448,7 @@ TEST_F(ply_exporter_ply_data_test, CubeLoadPLYDataUV)
|
||||
EXPECT_EQ(plyData.vertices.size(), 8);
|
||||
EXPECT_EQ(plyData.uv_coordinates.size(), 8);
|
||||
}
|
||||
TEST_F(ply_exporter_ply_data_test, CubeLooseEdgesLoadPLYData)
|
||||
TEST_F(PLYExportPLYDataTest, CubeLooseEdgesLoadPLYData)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
params.forward_axis = IO_AXIS_Y;
|
||||
@@ -479,7 +479,7 @@ TEST_F(ply_exporter_ply_data_test, CubeLooseEdgesLoadPLYData)
|
||||
EXPECT_EQ_ARRAY(exp_face_sizes, plyData.face_sizes.data(), ARRAY_SIZE(exp_face_sizes));
|
||||
EXPECT_EQ_ARRAY(exp_faces, plyData.face_vertices.data(), ARRAY_SIZE(exp_faces));
|
||||
}
|
||||
TEST_F(ply_exporter_ply_data_test, CubeLooseEdgesLoadPLYDataUV)
|
||||
TEST_F(PLYExportPLYDataTest, CubeLooseEdgesLoadPLYDataUV)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
params.forward_axis = IO_AXIS_Y;
|
||||
@@ -525,7 +525,7 @@ TEST_F(ply_exporter_ply_data_test, CubeLooseEdgesLoadPLYDataUV)
|
||||
EXPECT_EQ_ARRAY(exp_faces, plyData.face_vertices.data(), ARRAY_SIZE(exp_faces));
|
||||
}
|
||||
|
||||
TEST_F(ply_exporter_ply_data_test, CubesVertexAttrs)
|
||||
TEST_F(PLYExportPLYDataTest, CubesVertexAttrs)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
params.export_uv = true;
|
||||
@@ -537,7 +537,7 @@ TEST_F(ply_exporter_ply_data_test, CubesVertexAttrs)
|
||||
EXPECT_EQ(plyData.vertex_custom_attr[0].data.size(), 28);
|
||||
}
|
||||
|
||||
TEST_F(ply_exporter_ply_data_test, SuzanneLoadPLYDataUV)
|
||||
TEST_F(PLYExportPLYDataTest, SuzanneLoadPLYDataUV)
|
||||
{
|
||||
PLYExportParams params = {};
|
||||
params.export_uv = true;
|
||||
|
||||
@@ -22,7 +22,7 @@ struct Expectation {
|
||||
float4 color_first = {-1, -1, -1, -1};
|
||||
};
|
||||
|
||||
class ply_import_test : public testing::Test {
|
||||
class PLYImportTest : public testing::Test {
|
||||
public:
|
||||
void import_and_check(const char *path, const Expectation &exp)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class ply_import_test : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(ply_import_test, PLYImportCube)
|
||||
TEST_F(PLYImportTest, PLYImportCube)
|
||||
{
|
||||
Expectation expect = {24,
|
||||
6,
|
||||
@@ -106,21 +106,21 @@ TEST_F(ply_import_test, PLYImportCube)
|
||||
import_and_check("cube_ascii.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PLYImportWireframeCube)
|
||||
TEST_F(PLYImportTest, PLYImportWireframeCube)
|
||||
{
|
||||
Expectation expect = {8, 0, 0, 12, 0, 31435, float3(-1, -1, -1), float3(1, 1, 1)};
|
||||
import_and_check("ASCII_wireframe_cube.ply", expect);
|
||||
import_and_check("wireframe_cube.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportBinaryDataStartsWithLF)
|
||||
TEST_F(PLYImportTest, PlyImportBinaryDataStartsWithLF)
|
||||
{
|
||||
Expectation expect = {4, 1, 4, 0, 37235, 0, float3(-1, -1, 0), float3(-1, 1, 0)};
|
||||
import_and_check("bin_data_starts_with_lf.ply", expect);
|
||||
import_and_check("bin_data_starts_with_lf_header_crlf.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PLYImportBunny)
|
||||
TEST_F(PLYImportTest, PLYImportBunny)
|
||||
{
|
||||
Expectation expect = {1623,
|
||||
1000,
|
||||
@@ -133,7 +133,7 @@ TEST_F(ply_import_test, PLYImportBunny)
|
||||
import_and_check("bunny2.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportManySmallHoles)
|
||||
TEST_F(PLYImportTest, PlyImportManySmallHoles)
|
||||
{
|
||||
Expectation expect = {2004,
|
||||
3524,
|
||||
@@ -149,14 +149,14 @@ TEST_F(ply_import_test, PlyImportManySmallHoles)
|
||||
import_and_check("many_small_holes.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportColorNotFull)
|
||||
TEST_F(PLYImportTest, PlyImportColorNotFull)
|
||||
{
|
||||
Expectation expect = {4, 1, 4, 0, 37235, 0, float3(1, 0, 1), float3(-1, 0, 1)};
|
||||
import_and_check("color_not_full_a.ply", expect);
|
||||
import_and_check("color_not_full_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportCustomDataElements)
|
||||
TEST_F(PLYImportTest, PlyImportCustomDataElements)
|
||||
{
|
||||
Expectation expect = {600,
|
||||
0,
|
||||
@@ -172,7 +172,7 @@ TEST_F(ply_import_test, PlyImportCustomDataElements)
|
||||
import_and_check("custom_data_elements.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportDoubleXYZ)
|
||||
TEST_F(PLYImportTest, PlyImportDoubleXYZ)
|
||||
{
|
||||
Expectation expect = {4,
|
||||
1,
|
||||
@@ -189,28 +189,28 @@ TEST_F(ply_import_test, PlyImportDoubleXYZ)
|
||||
import_and_check("double_xyz_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportFaceIndicesNotFirstProp)
|
||||
TEST_F(PLYImportTest, PlyImportFaceIndicesNotFirstProp)
|
||||
{
|
||||
Expectation expect = {4, 2, 6, 0, 4136, 0, float3(1, 0, 1), float3(-1, 0, 1)};
|
||||
import_and_check("face_indices_not_first_prop_a.ply", expect);
|
||||
import_and_check("face_indices_not_first_prop_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportFaceIndicesPrecededByList)
|
||||
TEST_F(PLYImportTest, PlyImportFaceIndicesPrecededByList)
|
||||
{
|
||||
Expectation expect = {4, 2, 6, 0, 4136, 0, float3(1, 0, 1), float3(-1, 0, 1)};
|
||||
import_and_check("face_indices_preceded_by_list_a.ply", expect);
|
||||
import_and_check("face_indices_preceded_by_list_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportFaceUVsColors)
|
||||
TEST_F(PLYImportTest, PlyImportFaceUVsColors)
|
||||
{
|
||||
Expectation expect = {4, 1, 4, 0, 37235, 0, float3(1, 0, 1), float3(-1, 0, 1)};
|
||||
import_and_check("face_uvs_colors_a.ply", expect);
|
||||
import_and_check("face_uvs_colors_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportFacesFirst)
|
||||
TEST_F(PLYImportTest, PlyImportFacesFirst)
|
||||
{
|
||||
Expectation expect = {4,
|
||||
1,
|
||||
@@ -227,7 +227,7 @@ TEST_F(ply_import_test, PlyImportFacesFirst)
|
||||
import_and_check("faces_first_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportFloatFormats)
|
||||
TEST_F(PLYImportTest, PlyImportFloatFormats)
|
||||
{
|
||||
Expectation expect = {4,
|
||||
1,
|
||||
@@ -244,21 +244,21 @@ TEST_F(ply_import_test, PlyImportFloatFormats)
|
||||
import_and_check("float_formats_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportPositionNotFull)
|
||||
TEST_F(PLYImportTest, PlyImportPositionNotFull)
|
||||
{
|
||||
Expectation expect = {0, 0, 0, 0};
|
||||
import_and_check("position_not_full_a.ply", expect);
|
||||
import_and_check("position_not_full_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportTristrips)
|
||||
TEST_F(PLYImportTest, PlyImportTristrips)
|
||||
{
|
||||
Expectation expect = {6, 4, 12, 0, 3404, 0, float3(1, 0, 1), float3(-3, 0, 1)};
|
||||
import_and_check("tristrips_a.ply", expect);
|
||||
import_and_check("tristrips_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportTypeAliases)
|
||||
TEST_F(PLYImportTest, PlyImportTypeAliases)
|
||||
{
|
||||
Expectation expect = {4,
|
||||
1,
|
||||
@@ -276,7 +276,7 @@ TEST_F(ply_import_test, PlyImportTypeAliases)
|
||||
import_and_check("type_aliases_be_b.ply", expect);
|
||||
}
|
||||
|
||||
TEST_F(ply_import_test, PlyImportVertexCompOrder)
|
||||
TEST_F(PLYImportTest, PlyImportVertexCompOrder)
|
||||
{
|
||||
Expectation expect = {4,
|
||||
1,
|
||||
|
||||
@@ -34,7 +34,7 @@ static std::string read_temp_file_in_string(const std::string &file_path)
|
||||
return res;
|
||||
}
|
||||
|
||||
class stl_export_test : public BlendfileLoadingBaseTest {
|
||||
class STLExportTest : public BlendfileLoadingBaseTest {
|
||||
public:
|
||||
bool load_file_and_depsgraph(const std::string &filepath)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ class stl_export_test : public BlendfileLoadingBaseTest {
|
||||
}
|
||||
|
||||
protected:
|
||||
stl_export_test()
|
||||
STLExportTest()
|
||||
{
|
||||
_params = {};
|
||||
_params.forward_axis = IO_AXIS_Y;
|
||||
@@ -105,25 +105,25 @@ class stl_export_test : public BlendfileLoadingBaseTest {
|
||||
STLExportParams _params;
|
||||
};
|
||||
|
||||
TEST_F(stl_export_test, all_tris)
|
||||
TEST_F(STLExportTest, all_tris)
|
||||
{
|
||||
compare_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "all_tris.blend",
|
||||
"io_tests" SEP_STR "stl" SEP_STR "all_tris.stl");
|
||||
}
|
||||
|
||||
TEST_F(stl_export_test, all_quads)
|
||||
TEST_F(STLExportTest, all_quads)
|
||||
{
|
||||
compare_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "all_quads.blend",
|
||||
"io_tests" SEP_STR "stl" SEP_STR "all_quads.stl");
|
||||
}
|
||||
|
||||
TEST_F(stl_export_test, non_uniform_scale)
|
||||
TEST_F(STLExportTest, non_uniform_scale)
|
||||
{
|
||||
compare_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "non_uniform_scale.blend",
|
||||
"io_tests" SEP_STR "stl" SEP_STR "non_uniform_scale.stl");
|
||||
}
|
||||
|
||||
TEST_F(stl_export_test, cubes_positioned)
|
||||
TEST_F(STLExportTest, cubes_positioned)
|
||||
{
|
||||
compare_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "cubes_positioned.blend",
|
||||
"io_tests" SEP_STR "stl" SEP_STR "cubes_positioned.stl");
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace blender::io::obj {
|
||||
constexpr bool save_failing_test_output = false;
|
||||
|
||||
/* This is also the test name. */
|
||||
class obj_exporter_test : public BlendfileLoadingBaseTest {
|
||||
class OBJExportTest : public BlendfileLoadingBaseTest {
|
||||
public:
|
||||
/**
|
||||
* \param filepath: relative to "tests" directory.
|
||||
@@ -55,7 +55,7 @@ class obj_exporter_test : public BlendfileLoadingBaseTest {
|
||||
|
||||
const std::string all_objects_file = "io_tests" SEP_STR "blend_scene" SEP_STR "all_objects.blend";
|
||||
|
||||
TEST_F(obj_exporter_test, filter_objects_curves_as_mesh)
|
||||
TEST_F(OBJExportTest, filter_objects_curves_as_mesh)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
if (!load_file_and_depsgraph(all_objects_file)) {
|
||||
@@ -67,7 +67,7 @@ TEST_F(obj_exporter_test, filter_objects_curves_as_mesh)
|
||||
EXPECT_EQ(objcurves.size(), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_test, filter_objects_curves_as_nurbs)
|
||||
TEST_F(OBJExportTest, filter_objects_curves_as_nurbs)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
if (!load_file_and_depsgraph(all_objects_file)) {
|
||||
@@ -80,7 +80,7 @@ TEST_F(obj_exporter_test, filter_objects_curves_as_nurbs)
|
||||
EXPECT_EQ(objcurves.size(), 3);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_test, filter_objects_selected)
|
||||
TEST_F(OBJExportTest, filter_objects_selected)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
if (!load_file_and_depsgraph(all_objects_file)) {
|
||||
@@ -269,7 +269,7 @@ static bool strings_equal_after_first_lines(const std::string &a, const std::str
|
||||
}
|
||||
|
||||
/* From here on, tests are whole file tests, testing for golden output. */
|
||||
class obj_exporter_regression_test : public obj_exporter_test {
|
||||
class OBJExportRegressionTest : public OBJExportTest {
|
||||
public:
|
||||
/**
|
||||
* Export the given blend file with the given parameters and
|
||||
@@ -325,7 +325,7 @@ class obj_exporter_regression_test : public obj_exporter_test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_tris)
|
||||
TEST_F(OBJExportRegressionTest, all_tris)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
compare_obj_export_to_golden("io_tests" SEP_STR "blend_geometry" SEP_STR "all_tris.blend",
|
||||
@@ -334,7 +334,7 @@ TEST_F(obj_exporter_regression_test, all_tris)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_quads)
|
||||
TEST_F(OBJExportRegressionTest, all_quads)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.global_scale = 2.0f;
|
||||
@@ -345,7 +345,7 @@ TEST_F(obj_exporter_regression_test, all_quads)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, fgons)
|
||||
TEST_F(OBJExportRegressionTest, fgons)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -357,7 +357,7 @@ TEST_F(obj_exporter_regression_test, fgons)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, edges)
|
||||
TEST_F(OBJExportRegressionTest, edges)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -369,7 +369,7 @@ TEST_F(obj_exporter_regression_test, edges)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, vertices)
|
||||
TEST_F(OBJExportRegressionTest, vertices)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -382,7 +382,7 @@ TEST_F(obj_exporter_regression_test, vertices)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cube_loose_edges)
|
||||
TEST_F(OBJExportRegressionTest, cube_loose_edges)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -394,7 +394,7 @@ TEST_F(obj_exporter_regression_test, cube_loose_edges)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, non_uniform_scale)
|
||||
TEST_F(OBJExportRegressionTest, non_uniform_scale)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_materials = false;
|
||||
@@ -405,7 +405,7 @@ TEST_F(obj_exporter_regression_test, non_uniform_scale)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, nurbs_as_nurbs)
|
||||
TEST_F(OBJExportRegressionTest, nurbs_as_nurbs)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -418,7 +418,7 @@ TEST_F(obj_exporter_regression_test, nurbs_as_nurbs)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, nurbs_curves_as_nurbs)
|
||||
TEST_F(OBJExportRegressionTest, nurbs_curves_as_nurbs)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -431,7 +431,7 @@ TEST_F(obj_exporter_regression_test, nurbs_curves_as_nurbs)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, nurbs_as_mesh)
|
||||
TEST_F(OBJExportRegressionTest, nurbs_as_mesh)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -444,7 +444,7 @@ TEST_F(obj_exporter_regression_test, nurbs_as_mesh)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cube_all_data_triangulated)
|
||||
TEST_F(OBJExportRegressionTest, cube_all_data_triangulated)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -457,7 +457,7 @@ TEST_F(obj_exporter_regression_test, cube_all_data_triangulated)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cube_normal_edit)
|
||||
TEST_F(OBJExportRegressionTest, cube_normal_edit)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -470,7 +470,7 @@ TEST_F(obj_exporter_regression_test, cube_normal_edit)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cube_vertex_groups)
|
||||
TEST_F(OBJExportRegressionTest, cube_vertex_groups)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_materials = false;
|
||||
@@ -484,7 +484,7 @@ TEST_F(obj_exporter_regression_test, cube_vertex_groups)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cubes_positioned)
|
||||
TEST_F(OBJExportRegressionTest, cubes_positioned)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_materials = false;
|
||||
@@ -496,7 +496,7 @@ TEST_F(obj_exporter_regression_test, cubes_positioned)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cubes_vertex_colors)
|
||||
TEST_F(OBJExportRegressionTest, cubes_vertex_colors)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_colors = true;
|
||||
@@ -510,7 +510,7 @@ TEST_F(obj_exporter_regression_test, cubes_vertex_colors)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cubes_with_textures_strip)
|
||||
TEST_F(OBJExportRegressionTest, cubes_with_textures_strip)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.path_mode = PATH_REFERENCE_STRIP;
|
||||
@@ -521,7 +521,7 @@ TEST_F(obj_exporter_regression_test, cubes_with_textures_strip)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, cubes_with_textures_relative)
|
||||
TEST_F(OBJExportRegressionTest, cubes_with_textures_relative)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.path_mode = PATH_REFERENCE_RELATIVE;
|
||||
@@ -532,7 +532,7 @@ TEST_F(obj_exporter_regression_test, cubes_with_textures_relative)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, suzanne_all_data)
|
||||
TEST_F(OBJExportRegressionTest, suzanne_all_data)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -546,7 +546,7 @@ TEST_F(obj_exporter_regression_test, suzanne_all_data)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_curves)
|
||||
TEST_F(OBJExportRegressionTest, all_curves)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_materials = false;
|
||||
@@ -556,7 +556,7 @@ TEST_F(obj_exporter_regression_test, all_curves)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_curves_as_nurbs)
|
||||
TEST_F(OBJExportRegressionTest, all_curves_as_nurbs)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_materials = false;
|
||||
@@ -567,7 +567,7 @@ TEST_F(obj_exporter_regression_test, all_curves_as_nurbs)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_objects)
|
||||
TEST_F(OBJExportRegressionTest, all_objects)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -580,7 +580,7 @@ TEST_F(obj_exporter_regression_test, all_objects)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, all_objects_mat_groups)
|
||||
TEST_F(OBJExportRegressionTest, all_objects_mat_groups)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.forward_axis = IO_AXIS_Y;
|
||||
@@ -593,7 +593,7 @@ TEST_F(obj_exporter_regression_test, all_objects_mat_groups)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, materials_without_pbr)
|
||||
TEST_F(OBJExportRegressionTest, materials_without_pbr)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_normals = false;
|
||||
@@ -604,7 +604,7 @@ TEST_F(obj_exporter_regression_test, materials_without_pbr)
|
||||
_export.params);
|
||||
}
|
||||
|
||||
TEST_F(obj_exporter_regression_test, materials_pbr)
|
||||
TEST_F(OBJExportRegressionTest, materials_pbr)
|
||||
{
|
||||
OBJExportParamsDefault _export;
|
||||
_export.params.export_normals = false;
|
||||
|
||||
@@ -49,9 +49,9 @@ struct Expectation {
|
||||
std::string first_mat;
|
||||
};
|
||||
|
||||
class obj_importer_test : public BlendfileLoadingBaseTest {
|
||||
class OBJImportTest : public BlendfileLoadingBaseTest {
|
||||
public:
|
||||
obj_importer_test()
|
||||
OBJImportTest()
|
||||
{
|
||||
params.global_scale = 1.0f;
|
||||
params.clamp_size = 0;
|
||||
@@ -192,7 +192,7 @@ class obj_importer_test : public BlendfileLoadingBaseTest {
|
||||
OBJImportParams params;
|
||||
};
|
||||
|
||||
TEST_F(obj_importer_test, import_cube)
|
||||
TEST_F(OBJImportTest, import_cube)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -209,7 +209,7 @@ TEST_F(obj_importer_test, import_cube)
|
||||
import_and_check("cube.obj", expect, std::size(expect), 1);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_cube_o_after_verts)
|
||||
TEST_F(OBJImportTest, import_cube_o_after_verts)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -239,7 +239,7 @@ TEST_F(obj_importer_test, import_cube_o_after_verts)
|
||||
import_and_check("cube_o_after_verts.obj", expect, std::size(expect), 2);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_suzanne_all_data)
|
||||
TEST_F(OBJImportTest, import_suzanne_all_data)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -257,7 +257,7 @@ TEST_F(obj_importer_test, import_suzanne_all_data)
|
||||
import_and_check("suzanne_all_data.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_nurbs)
|
||||
TEST_F(OBJImportTest, import_nurbs)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -273,7 +273,7 @@ TEST_F(obj_importer_test, import_nurbs)
|
||||
import_and_check("nurbs.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_nurbs_curves)
|
||||
TEST_F(OBJImportTest, import_nurbs_curves)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -300,7 +300,7 @@ TEST_F(obj_importer_test, import_nurbs_curves)
|
||||
import_and_check("nurbs_curves.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_nurbs_cyclic)
|
||||
TEST_F(OBJImportTest, import_nurbs_cyclic)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -316,7 +316,7 @@ TEST_F(obj_importer_test, import_nurbs_cyclic)
|
||||
import_and_check("nurbs_cyclic.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_nurbs_manual)
|
||||
TEST_F(OBJImportTest, import_nurbs_manual)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -335,7 +335,7 @@ TEST_F(obj_importer_test, import_nurbs_manual)
|
||||
import_and_check("nurbs_manual.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_nurbs_mesh)
|
||||
TEST_F(OBJImportTest, import_nurbs_mesh)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -351,7 +351,7 @@ TEST_F(obj_importer_test, import_nurbs_mesh)
|
||||
import_and_check("nurbs_mesh.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_materials)
|
||||
TEST_F(OBJImportTest, import_materials)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -395,7 +395,7 @@ TEST_F(obj_importer_test, import_materials)
|
||||
import_and_check("materials.obj", expect, std::size(expect), 4, 8);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_cubes_with_textures_rel)
|
||||
TEST_F(OBJImportTest, import_cubes_with_textures_rel)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -451,7 +451,7 @@ TEST_F(obj_importer_test, import_cubes_with_textures_rel)
|
||||
import_and_check("cubes_with_textures_rel.obj", expect, std::size(expect), 4, 4);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_faces_invalid_or_with_holes)
|
||||
TEST_F(OBJImportTest, import_faces_invalid_or_with_holes)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -493,7 +493,7 @@ TEST_F(obj_importer_test, import_faces_invalid_or_with_holes)
|
||||
import_and_check("faces_invalid_or_with_holes.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_invalid_faces)
|
||||
TEST_F(OBJImportTest, import_invalid_faces)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -502,7 +502,7 @@ TEST_F(obj_importer_test, import_invalid_faces)
|
||||
import_and_check("invalid_faces.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_invalid_indices)
|
||||
TEST_F(OBJImportTest, import_invalid_indices)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -520,7 +520,7 @@ TEST_F(obj_importer_test, import_invalid_indices)
|
||||
import_and_check("invalid_indices.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_invalid_syntax)
|
||||
TEST_F(OBJImportTest, import_invalid_syntax)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -538,7 +538,7 @@ TEST_F(obj_importer_test, import_invalid_syntax)
|
||||
import_and_check("invalid_syntax.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_all_objects)
|
||||
TEST_F(OBJImportTest, import_all_objects)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -699,7 +699,7 @@ TEST_F(obj_importer_test, import_all_objects)
|
||||
import_and_check("all_objects.obj", expect, std::size(expect), 7);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_cubes_vertex_colors)
|
||||
TEST_F(OBJImportTest, import_cubes_vertex_colors)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -770,7 +770,7 @@ TEST_F(obj_importer_test, import_cubes_vertex_colors)
|
||||
import_and_check("cubes_vertex_colors.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_cubes_vertex_colors_mrgb)
|
||||
TEST_F(OBJImportTest, import_cubes_vertex_colors_mrgb)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -821,7 +821,7 @@ TEST_F(obj_importer_test, import_cubes_vertex_colors_mrgb)
|
||||
import_and_check("cubes_vertex_colors_mrgb.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_vertices)
|
||||
TEST_F(OBJImportTest, import_vertices)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
@@ -831,7 +831,7 @@ TEST_F(obj_importer_test, import_vertices)
|
||||
import_and_check("vertices.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_split_options_by_object)
|
||||
TEST_F(OBJImportTest, import_split_options_by_object)
|
||||
{
|
||||
/* Default is to split by object */
|
||||
Expectation expect[] = {
|
||||
@@ -842,7 +842,7 @@ TEST_F(obj_importer_test, import_split_options_by_object)
|
||||
import_and_check("split_options.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_split_options_by_group)
|
||||
TEST_F(OBJImportTest, import_split_options_by_group)
|
||||
{
|
||||
params.use_split_objects = false;
|
||||
params.use_split_groups = true;
|
||||
@@ -858,7 +858,7 @@ TEST_F(obj_importer_test, import_split_options_by_group)
|
||||
import_and_check("split_options.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_split_options_by_object_and_group)
|
||||
TEST_F(OBJImportTest, import_split_options_by_object_and_group)
|
||||
{
|
||||
params.use_split_objects = true;
|
||||
params.use_split_groups = true;
|
||||
@@ -874,7 +874,7 @@ TEST_F(obj_importer_test, import_split_options_by_object_and_group)
|
||||
import_and_check("split_options.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_split_options_none)
|
||||
TEST_F(OBJImportTest, import_split_options_none)
|
||||
{
|
||||
params.use_split_objects = false;
|
||||
params.use_split_groups = false;
|
||||
@@ -885,7 +885,7 @@ TEST_F(obj_importer_test, import_split_options_none)
|
||||
import_and_check("split_options.obj", expect, std::size(expect), 0);
|
||||
}
|
||||
|
||||
TEST_F(obj_importer_test, import_polylines)
|
||||
TEST_F(OBJImportTest, import_polylines)
|
||||
{
|
||||
Expectation expect[] = {
|
||||
{"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)},
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace blender::io::obj {
|
||||
|
||||
class obj_mtl_parser_test : public testing::Test {
|
||||
class OBJMTLParserTest : public testing::Test {
|
||||
public:
|
||||
void check_string(const char *text, const MTLMaterial *expect, size_t expect_count)
|
||||
{
|
||||
@@ -83,7 +83,7 @@ class obj_mtl_parser_test : public testing::Test {
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(obj_mtl_parser_test, string_newlines_whitespace)
|
||||
TEST_F(OBJMTLParserTest, string_newlines_whitespace)
|
||||
{
|
||||
const char *text =
|
||||
"# a comment\n"
|
||||
@@ -130,7 +130,7 @@ TEST_F(obj_mtl_parser_test, string_newlines_whitespace)
|
||||
check_string(text, mat, ARRAY_SIZE(mat));
|
||||
}
|
||||
|
||||
TEST_F(obj_mtl_parser_test, cube)
|
||||
TEST_F(OBJMTLParserTest, cube)
|
||||
{
|
||||
MTLMaterial mat;
|
||||
mat.name = "red";
|
||||
@@ -139,7 +139,7 @@ TEST_F(obj_mtl_parser_test, cube)
|
||||
check("cube.mtl", &mat, 1);
|
||||
}
|
||||
|
||||
TEST_F(obj_mtl_parser_test, all_objects)
|
||||
TEST_F(OBJMTLParserTest, all_objects)
|
||||
{
|
||||
MTLMaterial mat[7];
|
||||
for (auto &m : mat) {
|
||||
@@ -168,7 +168,7 @@ TEST_F(obj_mtl_parser_test, all_objects)
|
||||
check("all_objects.mtl", mat, ARRAY_SIZE(mat));
|
||||
}
|
||||
|
||||
TEST_F(obj_mtl_parser_test, materials)
|
||||
TEST_F(OBJMTLParserTest, materials)
|
||||
{
|
||||
MTLMaterial mat[6];
|
||||
mat[0].name = "no_textures_red";
|
||||
@@ -274,7 +274,7 @@ TEST_F(obj_mtl_parser_test, materials)
|
||||
check("materials.mtl", mat, ARRAY_SIZE(mat));
|
||||
}
|
||||
|
||||
TEST_F(obj_mtl_parser_test, materials_without_pbr)
|
||||
TEST_F(OBJMTLParserTest, materials_without_pbr)
|
||||
{
|
||||
MTLMaterial mat[2];
|
||||
mat[0].name = "Mat1";
|
||||
@@ -304,7 +304,7 @@ TEST_F(obj_mtl_parser_test, materials_without_pbr)
|
||||
check("materials_without_pbr.mtl", mat, ARRAY_SIZE(mat));
|
||||
}
|
||||
|
||||
TEST_F(obj_mtl_parser_test, materials_pbr)
|
||||
TEST_F(OBJMTLParserTest, materials_pbr)
|
||||
{
|
||||
MTLMaterial mat[2];
|
||||
mat[0].name = "Mat1";
|
||||
|
||||
Reference in New Issue
Block a user