MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / TEST_F

Function TEST_F

tests/src/Attributes/VoxelDihedralAngleAttributeTest.h:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7};
8
9TEST_F(VoxelDihedralAngleAttributeTest, tet) {
10 MeshPtr mesh = load_mesh("tet.msh");
11 mesh->add_attribute("voxel_dihedral_angle");
12 ASSERT_TRUE(mesh->has_attribute("voxel_dihedral_angle"));
13 VectorF dihedral_angles = mesh->get_attribute("voxel_dihedral_angle");
14 ASSERT_EQ(6, dihedral_angles.size());
15 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[0]);
16 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[1]);
17 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[2]);
18 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[3]);
19 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[4]);
20 ASSERT_FLOAT_EQ(acos(1.0/3.0), dihedral_angles[5]);
21}

Callers

nothing calls this directly

Calls 5

load_meshFunction · 0.85
add_attributeMethod · 0.45
has_attributeMethod · 0.45
get_attributeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected