Skip to content

Commit 7c4f388

Browse files
authored
TEST( MRMesh, MeshCollidePrecise ): check for exact values (#4733)
1 parent 47fa8ff commit 7c4f388

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/MRTest/MRContoursCutTests.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ TEST( MRMesh, MeshCollidePrecise )
6969
const auto conv = getVectorConverters( meshA, meshB );
7070

7171
const auto intersections = findCollidingEdgeTrisPrecise( meshA, meshB, conv.toInt );
72-
// FIXME: the results are platform-dependent
73-
//EXPECT_EQ( intersections.edgesAtrisB.size(), 76 );
74-
//EXPECT_EQ( intersections.edgesBtrisA.size(), 76 );
72+
EXPECT_EQ( intersections.size(), 152 );
7573

7674
const auto contours = orderIntersectionContours( meshA.topology, meshB.topology, intersections );
7775
EXPECT_EQ( contours.size(), 4 );
7876
// FIXME: the results are platform-dependent
79-
//EXPECT_EQ( contours[0].size(), 71 );
80-
//EXPECT_EQ( contours[1].size(), 71 );
81-
//EXPECT_EQ( contours[2].size(), 7 );
82-
//EXPECT_EQ( contours[3].size(), 7 );
77+
EXPECT_EQ( contours[0].size(), 71 );
78+
EXPECT_EQ( contours[1].size(), 7 );
79+
EXPECT_TRUE( contours[2].size() == 69 || // without FMA instruction (default settings for x86 or old compilers for ARM)
80+
contours[2].size() == 71 ); // with FMA instruction (modern compilers for ARM)
81+
EXPECT_TRUE( contours[3].size() == 9 || // without FMA instruction (default settings for x86 or old compilers for ARM)
82+
contours[3].size() == 7 ); // with FMA instruction (modern compilers for ARM)
8383

8484
OneMeshContours meshAContours, meshBContours;
8585
getOneMeshIntersectionContours( meshA, meshB, contours, &meshAContours, &meshBContours, conv );

0 commit comments

Comments
 (0)