# # # add_file "roster_tests.hh" # content [2a7c9e87be949541081a52fe18aa732a544397d6] # # patch "Makefile.am" # from [789e3045b844e413fabcc6180e5898ed812ac3c5] # to [f9f47a97e59ee658ae1830700e403bd981c8a156] # # patch "merge_roster.cc" # from [acfb17d85ecf0a9691ebb8833817b43750b5725d] # to [eb800b3f9442d5f00790e1f92d1b560b23714a2c] # # patch "roster.cc" # from [2ffc18c20c2e53c540b7312a125681d60a6778f9] # to [fdcabef3294b34d9816a3da0d2da8e2d90befdb2] # # patch "roster.hh" # from [ef1b40df5043af074ee007ea5efdb726e1b4112f] # to [90a95971b06f5586a5bd9c76dc701c643280bf87] # # patch "roster_delta.cc" # from [f05705a1dbf00dbb77d4f13153a26da957a0c9a9] # to [f21967cc9f37298083c2a384d167e325e2fa197d] # # patch "roster_delta.hh" # from [1c64a4f5d5b9c474f5709f108357269fb2c934d9] # to [1cbd73f46a1aa4864ae5b172b67662e8088b810d] # ============================================================ --- roster_tests.hh 2a7c9e87be949541081a52fe18aa732a544397d6 +++ roster_tests.hh 2a7c9e87be949541081a52fe18aa732a544397d6 @@ -0,0 +1,36 @@ +#ifndef __ROSTER_TESTS_HH__ +#define __ROSTER_TESTS_HH__ + +// Copyright (C) 2008 Stephen Leake
+// Copyright (C) 2005 Nathaniel Smith +// +// This program is made available under the GNU GPL version 2.0 or +// greater. See the accompanying file COPYING for details. +// +// This program is distributed WITHOUT ANY WARRANTY; without even the +// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +// PURPOSE. + +// Interfaces among roster.cc, merge_roster.cc, and roster_delta.cc +// used exclusively for testing. + +struct testing_node_id_source + : public node_id_source +{ + testing_node_id_source(); + virtual node_id next(); + node_id curr; +}; + +void test_roster_delta_on(roster_t const & a, marking_map const & a_marking, + roster_t const & b, marking_map const & b_marking); + +// Local Variables: +// mode: C++ +// fill-column: 76 +// c-file-style: "gnu" +// indent-tabs-mode: nil +// End: +// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: + +#endif ============================================================ --- Makefile.am 789e3045b844e413fabcc6180e5898ed812ac3c5 +++ Makefile.am f9f47a97e59ee658ae1830700e403bd981c8a156 @@ -305,9 +305,9 @@ UNIT_TEST_SOURCES = \ string_queue.cc transforms.cc uri.cc vocab.cc xdelta.cc # these files do not contain unit tests, but are required for unit testing -# and must be recompiled for that purpose +# and are not used by the main program UNIT_TEST_SRC_SUPPORT = \ - roster_delta.cc randomizer.cc randomizer.hh unit_tests.cc + randomizer.cc randomizer.hh roster_tests.hh unit_tests.cc # these files do not contain unit tests; they are required for unit # testing, but can be used "as is" from the main build. (many of @@ -321,8 +321,8 @@ UNIT_TEST_OBJ_SUPPORT = \ mtn-lua.$(OBJEXT) mtn-lua_hooks.$(OBJEXT) \ mtn-merge_content.$(OBJEXT) mtn-merkle_tree.$(OBJEXT) \ mtn-pcrewrap.$(OBJEXT) mtn-project.$(OBJEXT) \ - mtn-sanity.$(OBJEXT) mtn-schema.$(OBJEXT) \ - mtn-migrate_schema.$(OBJEXT) \ + mtn-roster_delta.$(OBJEXT) mtn-sanity.$(OBJEXT) \ + mtn-schema.$(OBJEXT) mtn-migrate_schema.$(OBJEXT) \ mtn-specialized_lexical_cast.$(OBJEXT) mtn-ssh_agent.$(OBJEXT) \ mtn-std_hooks.$(OBJEXT) mtn-ui.$(OBJEXT) mtn-work.$(OBJEXT) \ mtn-migrate_work.$(OBJEXT) ============================================================ --- merge_roster.cc acfb17d85ecf0a9691ebb8833817b43750b5725d +++ merge_roster.cc eb800b3f9442d5f00790e1f92d1b560b23714a2c @@ -3113,6 +3113,7 @@ roster_merge(roster_t const & left_paren #include "unit_tests.hh" #include "constants.hh" #include "roster_delta.hh" +#include "roster_tests.hh" // cases for testing: // ============================================================ --- roster.cc 2ffc18c20c2e53c540b7312a125681d60a6778f9 +++ roster.cc fdcabef3294b34d9816a3da0d2da8e2d90befdb2 @@ -2722,8 +2722,8 @@ void calculate_ident(roster_t const & ro #include "sanity.hh" #include "constants.hh" #include "randomizer.hh" - #include "roster_delta.hh" +#include "roster_tests.hh" #include