<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">kd_tree test passes now. 'make check' fails because I don't include CGM and dagmc uses CGM, so I use configure:<br>./configure --prefix=/home/rajeev/FATHOM/lib/MOAB/ --enable-debug --enable-shared<span style="font-weight: bold;"> --disable-dagmc</span><br><br>and all the 'make check' works fine. <br><br><font style="font-family: arial,helvetica,sans-serif;" size="2">Rajeev</font><br><div><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> "kraftche@cae.wisc.edu" <kraftche@cae.wisc.edu><br><b><span style="font-weight: bold;">To:</span></b> moab-dev@mcs.anl.gov<br><b><span style="font-weight:
bold;">Sent:</span></b> Tuesday, March 23, 2010 10:55:31<br><b><span style="font-weight: bold;">Subject:</span></b> [MOAB-dev] r3696 - MOAB/trunk/test<br></font><br>Author: kraftche<br>Date: 2010-03-23 10:55:31 -0500 (Tue, 23 Mar 2010)<br>New Revision: 3696<br><br>Modified:<br> MOAB/trunk/test/kd_tree_test.cpp<br>Log:<br>clean up kd_tree_test<br><br>o use TestUtil.hpp to run tests and verify results<br>o split one large test function into individual tests<br>o don't test save/restore if no HDF5 support<br><br><br>Modified: MOAB/trunk/test/kd_tree_test.cpp<br>===================================================================<br>--- MOAB/trunk/test/kd_tree_test.cpp 2010-03-23 01:57:56 UTC (rev 3695)<br>+++ MOAB/trunk/test/kd_tree_test.cpp 2010-03-23 15:55:31 UTC (rev 3696)<br>@@ -1,156 +1,192 @@<br> #include "moab/Core.hpp"<br> #include "moab/AdaptiveKDTree.hpp"<br> #include "moab/Range.hpp"<br>+#include
"moab/CartVect.hpp"<br> <br> #include <math.h><br> #include <assert.h><br> #include <float.h><br> #include <cstdio><br> <br>-#include "moab/CartVect.hpp"<br>+#include "TestUtil.hpp"<br> <br>-#include <stdlib.h><br>-#ifdef NDEBUG<br>-# undef assert<br>-# define assert(A) do { if (!(A)) abort(); } while(false)<br>-#endif<br>-<br> using namespace moab;<br> <br> const unsigned INTERVALS = 4;<br> const unsigned DEPTH = 7; // 3*log2(INTERVALS)+1<br> const char* TAG_NAME = "TEST_DATA";<br> <br>-void test_iterator_back( AdaptiveKDTree& tool, EntityHandle root );<br>-void test_point_search( AdaptiveKDTree& tool, EntityHandle root );<br>+EntityHandle create_tree( AdaptiveKDTree& tool, unsigned depth, int intervals, Tag* tag_handle = 0 );<br>+void validate_tree( AdaptiveKDTree& tool, EntityHandle root, int depth, double intervals );<br> <br>+void test_tree_create();<br>+void test_leaf_merge();<br>+void
test_tree_readwrite();<br>+void test_tree_delete();<br>+void test_iterator_back();<br>+void test_point_search();<br>+<br> int main()<br> {<br>- // Initialize MOAB & create tree tool<br>- Core moab;<br>- AdaptiveKDTree tool(&moab);<br>+ int err = RUN_TEST(test_tree_create);<br>+ if (err) // can't run other tests if can't create tree<br>+ return 1;<br>+ err += RUN_TEST(test_leaf_merge);<br>+#ifdef HDF5_FILE<br>+ err += RUN_TEST(test_tree_readwrite);<br>+#endif<br>+ err += RUN_TEST(test_tree_delete);<br>+ err += RUN_TEST(test_iterator_back);<br>+ err += RUN_TEST(test_point_search);<br> <br>+ return err;<br>+}<br>+<br>+EntityHandle create_tree( AdaptiveKDTree& tool, unsigned depth, int intervals, Tag* tag_handle )<br>+{<br> // Create tree root<br> ErrorCode err;<br> EntityHandle root, leaf;<br> const double
tree_box_min_corner[] = { 0, 0, 0 }; <br> // Make each leaf box be 1x1x1.<br>- const double tree_box_max_corner[] = { INTERVALS, INTERVALS, INTERVALS };<br>+ const double tree_box_max_corner[] = { intervals, intervals, intervals };<br> err = tool.create_tree( tree_box_min_corner, tree_box_max_corner, root );<br> assert(!err);<br> <br> // Use iterator to create tree to fixed depth of DEPTH<br> AdaptiveKDTreeIter iter;<br> err = tool.get_tree_iterator( root, iter );<br>- assert(!err);<br>+ CHECK_ERR(err);<br> while(err == MB_SUCCESS) { <br>- if (iter.depth() < DEPTH) {<br>+ if (iter.depth() < depth) {<br> // bisect leaves along alternating axes<br> AdaptiveKDTree::Plane split;<br> split.norm = iter.depth() % 3; // alternate split axes;<br>
split.coord = 0.5 * (iter.box_min()[split.norm] + iter.box_max()[split.norm]);<br> err = tool.split_leaf( iter, split ); // advances iter to first new leaf<br>- assert(!err);<br>+ CHECK_ERR(err);<br> }<br> // if current leaf is at desired depth, advance to next one<br> else {<br> err = iter.step();<br> }<br> }<br>- assert(MB_ENTITY_NOT_FOUND == err);<br>+ CHECK(MB_ENTITY_NOT_FOUND == err);<br> <br>+ if (!tag_handle)<br>+ return root;<br>+ <br> // define a tag to use to store integer values on tree leaves<br>- Tag data;<br>- err = moab.tag_create( TAG_NAME, sizeof(int), MB_TAG_DENSE, MB_TYPE_INTEGER, data, 0, false );<br>- assert(!err);<br>+ err = tool.moab()->tag_create( TAG_NAME, sizeof(int), MB_TAG_DENSE,
MB_TYPE_INTEGER, *tag_handle, 0, false );<br>+ CHECK_ERR(err);<br>+<br>+ // iterate over tree setting data<br>+ int counter = 0;<br>+ for (err = tool.get_tree_iterator( root, iter ); !err; err = iter.step()) {<br>+ // store integer value on leaf<br>+ ++counter;<br>+ leaf = iter.handle();<br>+ err = tool.moab()->tag_set_data( *tag_handle, &leaf, 1, &counter );<br>+ CHECK_ERR(err);<br>+ }<br> <br>- // iterate over tree, verifying leaves and setting data<br>+ return root;<br>+}<br>+<br>+void validate_tree( AdaptiveKDTree& tool, EntityHandle root, unsigned depth, int intervals, Tag data )<br>+{<br>+ ErrorCode err;<br>+ const double VOL = 1.0; // all leaves should be 1x1x1 boxes<br>+ int val;<br>+<br>+ // iterate over tree, verifying leaves <br>+ AdaptiveKDTreeIter iter;<br> int counter =
0;<br> for (err = tool.get_tree_iterator( root, iter ); !err; err = iter.step()) {<br> // store integer value on leaf<br> ++counter;<br>- leaf = iter.handle();<br>- err = moab.tag_set_data( data, &leaf, 1, &counter );<br>- assert(!err);<br>- <br>+ EntityHandle leaf = iter.handle();<br>+ CHECK(leaf != 0);<br>+ CHECK_EQUAL(MBENTITYSET, TYPE_FROM_HANDLE(leaf));<br>+ <br> // check size of leaf<br> const double* min = iter.box_min();<br> const double* max = iter.box_max();<br> double dims[] = { max[0] - min[0], max[1] - min[1], max[2] - min[2] };<br> double volume = dims[0] * dims[1] * dims[2];<br>- assert( fabs(volume - 1.0) <= DBL_EPSILON ); <br>+ CHECK_REAL_EQUAL( VOL, volume, DBL_EPSILON );
<br> <br> // check depth of leaf<br>- assert( iter.depth() == DEPTH );<br>+ CHECK_EQUAL( depth, iter.depth() );<br>+ <br>+ // check tag value on leaf<br>+ err = tool.moab()->tag_get_data( data, &leaf, 1, &val );<br>+ CHECK_ERR(err);<br>+ CHECK_EQUAL(counter, val);<br> }<br> // check number of leaves<br>- const int num_leaves = INTERVALS*INTERVALS*INTERVALS;<br>- assert( num_leaves == counter );<br>+ const int num_leaves = intervals*intervals*intervals;<br>+ CHECK_EQUAL( num_leaves, counter );<br>+}<br>+<br>+void test_tree_create()<br>+{<br>+ Tag tag;<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ const EntityHandle root = create_tree( tool, DEPTH, INTERVALS, &tag );<br>+ validate_tree( tool, root, DEPTH, INTERVALS, tag );<br>+}<br>+<br>+void
test_leaf_merge()<br>+{<br>+ ErrorCode err;<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ Tag data;<br>+ const EntityHandle root = create_tree( tool, DEPTH, INTERVALS, &data );<br> <br>- test_iterator_back( tool, root );<br>- test_point_search( tool, root );<br>- <br> // reduce tree depth to DEPTH-1 by merging adjacent leaf pairs, <br> // make new "leaf" have smaller of two data values on original pair<br>+ AdaptiveKDTreeIter iter;<br> for (err = tool.get_tree_iterator( root, iter ); !err; err = iter.step()) {<br> // get data for first leaf<br> int data1;<br>- leaf = iter.handle();<br>- err = moab.tag_get_data( data, &leaf, 1, &data1 );<br>- assert(!err);<br>+ EntityHandle leaf = iter.handle();<br>+ err = mb.tag_get_data( data, &leaf, 1, &data1
);<br>+ CHECK_ERR(err);<br> // tree traversal is always such that two leaves with same parent are consective<br> err = iter.step();<br>- assert(!err);<br>+ CHECK_ERR(err);<br> // get data for sibling<br> int data2;<br> leaf = iter.handle();<br>- err = moab.tag_get_data( data, &leaf, 1, &data2 );<br>- assert(!err);<br>+ err = mb.tag_get_data( data, &leaf, 1, &data2 );<br>+ CHECK_ERR(err);<br> // as we stored increasing values, these had better be increasing<br>- assert( data2 - data1 == 1 );<br>+ CHECK_EQUAL( 1, data2 - data1 );<br> // merge leaf pair (iter can be at either one)<br> err = tool.merge_leaf( iter ); // changes iter to be new "merged" leaf<br>- assert(!err);<br>+
CHECK_ERR(err);<br> // store smaller of two values on new leaf<br> leaf = iter.handle();<br>- err = moab.tag_set_data( data, &leaf, 1, &data1 );<br>- assert(!err);<br>+ err = mb.tag_set_data( data, &leaf, 1, &data1 );<br>+ CHECK_ERR(err);<br> }<br>- <br>- // write to file<br>- err = moab.write_file( "tree.h5m" );<br>- assert(!err);<br> <br>- // clear everything<br>- moab.delete_mesh();<br> <br>- // read tree from file<br>- err = moab.load_file( "tree.h5m" );<br>- assert(!err);<br>- <br>- // get tag handle by name, because the handle may have changed<br>- err = moab.tag_get_handle( TAG_NAME, data );<br>- assert(!err);<br>-<br>- // get root handle for tree<br>- Range range;<br>- err = tool.find_all_trees( range );<br>- assert(!err);<br>-
assert(range.size() == 1);<br>- root = range.front(); // first (only) handle<br>- <br> // Iterate over tree, verifying leaves and checking data<br> // Initial leaves had volume of 1 : merged pairs of leaves so volume should now be 2.<br> // Initial leaves were enumerated in order : merged pairs so new leaves should<br> // have data incrementing in steps of 2.<br>- counter = 1;<br>+ int counter = 1;<br> for (err = tool.get_tree_iterator( root, iter ); !err; err = iter.step()) {<br> // store integer value on leaf<br> int data1;<br>- leaf = iter.handle();<br>- err = moab.tag_get_data( data, &leaf, 1, &data1 );<br>- assert(!err);<br>- assert( counter == data1 );<br>+ EntityHandle leaf = iter.handle();<br>+ err = mb.tag_get_data( data, &leaf, 1, &data1 );<br>+
CHECK_ERR(err);<br>+ CHECK_EQUAL( counter, data1 );<br> counter += 2;<br> <br> // check size of leaf<br>@@ -158,48 +194,73 @@<br> const double* max = iter.box_max();<br> double dims[] = { max[0] - min[0], max[1] - min[1], max[2] - min[2] };<br> double volume = dims[0] * dims[1] * dims[2];<br>- assert( fabs(volume - 2.0) <= DBL_EPSILON ); <br>+ CHECK_REAL_EQUAL( 2.0, volume, DBL_EPSILON ); <br> <br> // check depth of leaf<br>- assert( iter.depth() == DEPTH-1 );<br>+ CHECK_EQUAL( DEPTH-1, iter.depth() );<br> }<br>- // check number of leaves<br>- // (num_leaves is original number of leaves, twice current number,<br>- // but counter is incremented by 2 for each iteration, so just<br>- //
compare them.)<br>- assert( counter-1 == num_leaves );<br>- <br>- <br>- // Delete data from tree<br>- err = moab.tag_delete( data );<br>- assert( !err );<br>+}<br> <br>+void test_tree_readwrite()<br>+{<br>+ ErrorCode err;<br>+ Tag tag;<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ EntityHandle root = create_tree( tool, DEPTH, INTERVALS, &tag );<br> <br> // write to file<br>- err = moab.write_file( "tree.h5m" );<br>- assert(!err);<br>+ err = mb.write_file( "tree.h5m" );<br>+ CHECK_ERR(err);<br> <br> // clear everything<br>- moab.delete_mesh();<br>+ mb.delete_mesh();<br> <br> // read tree from file<br>- err = moab.load_file( "tree.h5m" );<br>+ err = mb.load_file( "tree.h5m" );<br>+ remove("tree.h5m");<br>+ CHECK_ERR(err);<br>+ <br>+ // get tag handle by name, because the
handle may have changed<br>+ err = mb.tag_get_handle( TAG_NAME, tag );<br>+ CHECK_ERR(err);<br>+<br>+ // get root handle for tree<br>+ Range range;<br>+ err = tool.find_all_trees( range );<br> assert(!err);<br>+ assert(range.size() == 1);<br>+ root = range.front(); // first (only) handle<br> <br>- // check that tag doesn't exist<br>- err = moab.tag_get_handle( TAG_NAME, data );<br>- assert( MB_TAG_NOT_FOUND == err );<br>+ validate_tree( tool, root, DEPTH, INTERVALS, tag );<br>+}<br> <br>- remove( "tree.h5m" );<br>- return 0;<br>+void test_tree_delete()<br>+{<br>+ ErrorCode err;<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ Tag data;<br>+ const EntityHandle root = create_tree( tool, DEPTH, INTERVALS, &data );<br>+ <br>+ err = tool.delete_tree( root );<br>+ CHECK_ERR(err);<br>+ <br>+ Range
ents;<br>+ err = mb.get_entities_by_type_and_tag( 0, MBENTITYSET, &data, 0, 1, ents );<br>+ CHECK_ERR(err);<br>+ CHECK(ents.empty());<br> }<br> <br>-<br>-void test_iterator_back( AdaptiveKDTree& tool, EntityHandle root )<br>+void test_iterator_back( )<br> {<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ const EntityHandle root = create_tree( tool, DEPTH, INTERVALS );<br>+ <br> AdaptiveKDTreeIter iter;<br> ErrorCode rval = tool.get_tree_iterator( root, iter );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> <br> CartVect min( iter.box_min() );<br> CartVect max( iter.box_max() );<br>@@ -207,14 +268,18 @@<br> <br> // going back from first location should fail.<br> rval = iter.back();<br>- assert( MB_ENTITY_NOT_FOUND == rval );<br>+ CHECK_EQUAL( MB_ENTITY_NOT_FOUND, rval );<br> rval =
tool.get_tree_iterator( root, iter );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> <br> // make sure iterator is valid<br>- assert( iter.box_min()[0] == min[0] && iter.box_min()[1] == min[1] && iter.box_min()[2] == min[2] );<br>- assert( iter.box_max()[0] == max[0] && iter.box_max()[1] == max[1] && iter.box_max()[2] == max[2] );<br>- assert( iter.handle() == leaf );<br>+ CHECK_REAL_EQUAL( min[0], iter.box_min()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( min[1], iter.box_min()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( min[2], iter.box_min()[2], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( max[0], iter.box_max()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( max[1], iter.box_max()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( max[2], iter.box_max()[2], DBL_EPSILON );<br>+ CHECK_EQUAL( leaf, iter.handle() );<br> <br>
while (MB_SUCCESS == iter.step()) {<br> // Get values at current iterator location<br>@@ -224,21 +289,29 @@<br> <br> // step back to previous location<br> rval = iter.back();<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> <br> // check expected values for previous location<br>- assert( iter.box_min()[0] == min[0] && iter.box_min()[1] == min[1] && iter.box_min()[2] == min[2] );<br>- assert( iter.box_max()[0] == max[0] && iter.box_max()[1] == max[1] && iter.box_max()[2] == max[2] );<br>- assert( iter.handle() == leaf );<br>+ CHECK_REAL_EQUAL( min[0], iter.box_min()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( min[1], iter.box_min()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( min[2], iter.box_min()[2], DBL_EPSILON
);<br>+ CHECK_REAL_EQUAL( max[0], iter.box_max()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( max[1], iter.box_max()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( max[2], iter.box_max()[2], DBL_EPSILON );<br>+ CHECK_EQUAL( leaf, iter.handle() );<br> <br> // advance iterator to 'current' location<br> rval = iter.step();<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> <br> // check that iterator values are correct<br>- assert( iter.box_min()[0] == next_min[0] && iter.box_min()[1] == next_min[1] && iter.box_min()[2] == next_min[2] );<br>- assert( iter.box_max()[0] == next_max[0] && iter.box_max()[1] == next_max[1] && iter.box_max()[2] == next_max[2] );<br>- assert( iter.handle() == next_leaf );<br>+
CHECK_REAL_EQUAL( next_min[0], iter.box_min()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( next_min[1], iter.box_min()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( next_min[2], iter.box_min()[2], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( next_max[0], iter.box_max()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( next_max[1], iter.box_max()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( next_max[2], iter.box_max()[2], DBL_EPSILON );<br>+ CHECK_EQUAL( next_leaf, iter.handle() );<br> <br> // store values for next iteration<br> min = next_min;<br>@@ -247,8 +320,12 @@<br> }<br> }<br> <br>-void test_point_search( AdaptiveKDTree& tool, EntityHandle root )<br>+void test_point_search()<br> {<br>+ Core mb;<br>+ AdaptiveKDTree tool(&mb);<br>+ const EntityHandle root = create_tree( tool, DEPTH, INTERVALS );<br>+ <br>
ErrorCode rval;<br> EntityHandle leaf;<br> AdaptiveKDTreeIter iter, iter2;<br>@@ -259,56 +336,58 @@<br> <br> // compare leaf search to iterator search<br> rval = tool.leaf_containing_point( root, left.array(), leaf );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> rval = tool.leaf_containing_point( root, left.array(), iter );<br>- assert( MB_SUCCESS == rval );<br>- assert( iter.handle() == leaf );<br>+ CHECK_ERR(rval);<br>+ CHECK_EQUAL( leaf, iter.handle() );<br> <br> // iterator should be at 'first' leaf <br> rval = tool.get_tree_iterator( root, iter2 );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> for (;;) {<br>- assert( iter.handle() == iter2.handle() );<br>- assert( iter.depth() == iter2.depth() );<br>- assert( iter.box_min()[0] == iter2.box_min()[0]
);<br>- assert( iter.box_min()[1] == iter2.box_min()[1] );<br>- assert( iter.box_min()[2] == iter2.box_min()[2] );<br>- assert( iter.box_max()[0] == iter2.box_max()[0] );<br>- assert( iter.box_max()[1] == iter2.box_max()[1] );<br>- assert( iter.box_max()[2] == iter2.box_max()[2] );<br>+ CHECK_EQUAL( iter.handle(), iter2.handle() );<br>+ CHECK_EQUAL( iter.depth(), iter2.depth() );<br>+ CHECK_REAL_EQUAL( iter.box_min()[0], iter2.box_min()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_min()[1], iter2.box_min()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_min()[2], iter2.box_min()[2], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_max()[0], iter2.box_max()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_max()[1], iter2.box_max()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL(
iter.box_max()[2], iter2.box_max()[2], DBL_EPSILON );<br> <br> rval = iter2.step();<br>- if (MB_SUCCESS != rval)<br>+ if (MB_ENTITY_NOT_FOUND == rval)<br> break;<br>+ CHECK_ERR(rval);<br> rval = iter.step();<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> }<br> <br> // compare leaf search to iterator search<br> rval = tool.leaf_containing_point( root, right.array(), leaf );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> rval = tool.leaf_containing_point( root, right.array(), iter );<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> assert( iter.handle() == leaf );<br> <br> // iterator should be at 'last' leaf <br> rval = tool.get_last_iterator( root, iter2 );<br>- assert( MB_SUCCESS ==
rval );<br>+ CHECK_ERR(rval);<br> for (;;) {<br>- assert( iter.handle() == iter2.handle() );<br>- assert( iter.depth() == iter2.depth() );<br>- assert( iter.box_min()[0] == iter2.box_min()[0] );<br>- assert( iter.box_min()[1] == iter2.box_min()[1] );<br>- assert( iter.box_min()[2] == iter2.box_min()[2] );<br>- assert( iter.box_max()[0] == iter2.box_max()[0] );<br>- assert( iter.box_max()[1] == iter2.box_max()[1] );<br>- assert( iter.box_max()[2] == iter2.box_max()[2] );<br>+ CHECK_EQUAL( iter.handle(), iter2.handle() );<br>+ CHECK_EQUAL( iter.depth(), iter2.depth() );<br>+ CHECK_REAL_EQUAL( iter.box_min()[0], iter2.box_min()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_min()[1], iter2.box_min()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_min()[2],
iter2.box_min()[2], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_max()[0], iter2.box_max()[0], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_max()[1], iter2.box_max()[1], DBL_EPSILON );<br>+ CHECK_REAL_EQUAL( iter.box_max()[2], iter2.box_max()[2], DBL_EPSILON );<br> <br> rval = iter2.back();<br>- if (MB_SUCCESS != rval)<br>+ if (MB_ENTITY_NOT_FOUND == rval)<br> break;<br>+ CHECK_ERR(rval);<br> rval = iter.back();<br>- assert( MB_SUCCESS == rval );<br>+ CHECK_ERR(rval);<br> }<br> }<br> <br><br></div></div>
</div><br>
<hr size=1> <a href="http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/"> New Email names for you! </a> <br>
Get the Email name you've always wanted on the new @ymail and @rocketmail.<br>
Hurry before someone else does!</body></html>