# # patch "roster4.cc" # from [ec48e1cdabfc26309f9e17ec3872b9940084eb4c] # to [c258a4af234f1da958ec271158a476202be0d824] # ======================================================================== --- roster4.cc ec48e1cdabfc26309f9e17ec3872b9940084eb4c +++ roster4.cc c258a4af234f1da958ec271158a476202be0d824 @@ -280,7 +280,7 @@ } - void path(split_path & pv) + void path(split_path & pv) const { I(!finished()); if (return_root) @@ -297,13 +297,13 @@ } - bool finished() + bool finished() const { return (!return_root) && stk.empty(); } - node_t operator*() + node_t operator*() const { I(!finished()); if (return_root) @@ -1970,6 +1970,15 @@ using boost::lexical_cast; static void +do_testing_on_one_roster(roster_t const & r) +{ + MM(r); + // read/write spin + // dfs_iter should return the same number of items as there are items in + // all_nodes() +} + +static void do_testing_on_two_equivalent_csets(cset const & a, cset const & b) { // we do all this reading/writing/comparing of both strings and objects to @@ -2022,6 +2031,7 @@ make_cset(original, r, derived); do_testing_on_two_equivalent_csets(cs, derived); + do_testing_on_one_roster(r); } static void @@ -2040,6 +2050,9 @@ MM(a); MM(b); + do_testing_on_one_roster(a); + do_testing_on_one_roster(b); + cset a_to_b; MM(a_to_b); cset b_to_a; MM(b_to_a); make_cset(a, b, a_to_b);