[cgma-dev] r5312 - cgm/trunk/test

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Thu Jan 12 10:01:42 CST 2012


Author: janehu
Date: 2012-01-12 10:01:42 -0600 (Thu, 12 Jan 2012)
New Revision: 5312

Modified:
   cgm/trunk/test/point_project.cpp
Log:
Trying to fix the nightly run fail problem, it's not crashing on mesh machine, but fails on the build machine which might be due to the tolerance issue.

Modified: cgm/trunk/test/point_project.cpp
===================================================================
--- cgm/trunk/test/point_project.cpp	2012-01-11 22:34:09 UTC (rev 5311)
+++ cgm/trunk/test/point_project.cpp	2012-01-12 16:01:42 UTC (rev 5312)
@@ -110,13 +110,13 @@
   CubitVector point(1,1,-5); 
   CubitVector on_surf;
   surf->closest_point_trimmed(point, on_surf); 
-  assert (on_surf.z() == -5);
+  assert (fabs(on_surf.z() + 5) < 0.0001);
   assert (on_surf.y() < 1.001 && on_surf.y() > 0.999);
   assert (on_surf.x() < 2.122 && on_surf.x() > 2.121 );
 
   CubitVector p1(0, 1.5, -6 );
   surf->closest_point_trimmed(p1, on_surf);
-  assert (on_surf.z() == -5);
+  assert (fabs(on_surf.z() + 5) < 0.0001);
   assert (on_surf.y() < 2.122 && on_surf.y() > 2.121);
   assert (on_surf.x() < 0.0001 && on_surf.x() > -0.0001 );
   return CUBIT_SUCCESS;

































More information about the cgma-dev mailing list